Problem with PostgresQL
My sample java client is ok
but with my web application
[TopLink Info]: 2006.03.06 06:55:14.747--DatabaseSessionImpl(937)--TopLink, version: Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)
[TopLink Severe]: 2006.03.06 06:55:16.575--DatabaseSessionImpl(937)--Local Exception Stack:
Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: No suitable driverError Code: 0
at oracle.toplink.exceptions.TopLinkException.<init>(TopLinkException.java:46)
at oracle.toplink.exceptions.DatabaseException.<init>(DatabaseException.java:51)
at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:276)
at oracle.toplink.sessions.DefaultConnector.connect(DefaultConnector.java:64)
at oracle.toplink.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:147)
at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:197)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(DatabaseAccessor.java:221)
at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:273)
at oracle.toplink.publicinterface.DatabaseSession.connect(DatabaseSession.java:215)
at oracle.toplink.publicinterface.DatabaseSession.login(DatabaseSession.java:511)
at model.DepartamentoClient.getEmps(DepartamentoClient.java:75)
at viewcontroller.GetEmpsAction.execute(GetEmpsAction.java:30)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1485)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at oracle.toplink.sessions.DefaultConnector.connect(DefaultConnector.java:62)
... 27 more
Any news? I'm suffering form almost the same problem...
I try to write a JPA Java SE app running on top of PostgreSQL. From what I can tell (not many experiences in this area though) everything goes fine until toplink is supposed to get tge driver (which works fine while connecting using plain JDBC):
EntityManagerFactory emf = Persistence.createEntityManagerFactory("psql");
The result is:
[TopLink Finest]: 2006.06.05 11:07:11.359--ServerSession(22522451)--Thread(Thread[main,5,main])--property=toplink.weaving.static-only; default value=false
[TopLink Config]: 2006.06.05 11:07:11.640--ServerSession(22522451)--Thread(Thread[main,5,main])--The alias name for the entity class [class abc.jgc.db.Domain] is being defaulted to: Domain.
[TopLink Config]: 2006.06.05 11:07:11.656--ServerSession(22522451)--Thread(Thread[main,5,main])--The table name for entity [class abc.jgc.db.Domain] is being defaulted to: DOMAIN.
[TopLink Config]: 2006.06.05 11:07:11.687--ServerSession(22522451)--Thread(Thread[main,5,main])--The column name for element [public java.lang.String abc.jgc.db.Domain.getName()] is being defaulted to: NAME.
[TopLink Config]: 2006.06.05 11:07:11.718--ServerSession(22522451)--Thread(Thread[main,5,main])--The column name for element [public java.lang.String abc.jgc.db.Domain.getDescription()] is being defaulted to: DESCRIPTION.
[TopLink Config]: 2006.06.05 11:07:11.718--ServerSession(22522451)--Thread(Thread[main,5,main])--The alias name for the entity class [class abc.jgc.db.Group] is being defaulted to: Group.
[TopLink Config]: 2006.06.05 11:07:11.718--ServerSession(22522451)--Thread(Thread[main,5,main])--The table name for entity [class abc.jgc.db.Group] is being defaulted to: GROUP.
[TopLink Config]: 2006.06.05 11:07:11.718--ServerSession(22522451)--Thread(Thread[main,5,main])--The column name for element [public java.lang.String abc.jgc.db.Group.getName()] is being defaulted to: NAME.
[TopLink Finer]: 2006.06.05 11:07:11.734--ServerSession(22522451)--Thread(Thread[main,5,main])--Weaver processing class [abc.jgc.db.Group].
[TopLink Finer]: 2006.06.05 11:07:11.734--ServerSession(22522451)--Thread(Thread[main,5,main])--Weaver processing class [abc.jgc.db.Domain].
[TopLink Finest]: 2006.06.05 11:07:11.906--ServerSession(22522451)--Thread(Thread[main,5,main])--begin deploying Persistence Unit psql; state Predeployed; deploymentCount 0
[TopLink Finest]: 2006.06.05 11:07:11.921--ServerSession(22522451)--Thread(Thread[main,5,main])--property=toplink.logging.level; value=FINEST; translated value=FINEST
[TopLink Finest]: 2006.06.05 11:07:11.921--ServerSession(22522451)--Thread(Thread[main,5,main])--property=toplink.jdbc.user; value=xxx
[TopLink Finest]: 2006.06.05 11:07:11.937--ServerSession(22522451)--Thread(Thread[main,5,main])--property=toplink.jdbc.password; value=yyy
[TopLink Finest]: 2006.06.05 11:07:12.687--ServerSession(22522451)--Thread(Thread[main,5,main])--property=toplink.jdbc.driver; value=org.postgresql.Driver
[TopLink Info]: 2006.06.05 11:07:12.703--ServerSession(22522451)--Thread(Thread[main,5,main])--TopLink, version: Oracle TopLink Essentials - 2006.5 (Build 060511)
[TopLink Finest]: 2006.06.05 11:07:12.718--ServerSession(22522451)--Thread(Thread[main,5,main])--end deploying Persistence Unit psql; state Undeployed; deploymentCount 0
Exception in thread "main" Local Exception Stack:
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.5 (Build 060511)): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: No suitable driverError Code: 0
at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:289)
at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:87)
at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:170)
at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:537)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:170)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:258)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:84)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:127)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:121)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:76)
at abc.jgc.db.DataBase.setUpDB(DataBase.java:39)
at abc.jgc.JGC.<init>(JGC.java:30)
at abc.jgc.JGC.main(JGC.java:75)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:85)
... 11 more
I'm using PostgreSQL 8.1.3 and played with the corresponding JDBC drivers (8.1 407 and 8.2dev 503).
Thanks in advance!
Similar Messages
-
Locking problem with Postgresql
I'm having some intermittent deadlock problems with Postgresql (7.1 and
7.2) and Kodo 2.2.3 and 2.2.4.
It appears to be a conflict between my JDO and my JDBC code. I reduced
the problem section to the
method found below.
I am running 10 threads concurrently in this test script. Each thread
is calling the "runQuery()" method
below which creates a PersistenceManager, starts a transaction, runs an
unrelated JDBC query, and
then commits the transaction.
The transaction is unrelated to the JDBC query, but it seems to
interfere with it. After a random number
of transactions, it locks up. Now that I've upgraded to 7.2 and 2.2.4,
it doesn't seem to lock with an
"UPDATE waiting" message like it did with 7.1 and 2.2.3, but the script
still hangs. It's strange,
because if I remove the superfluous Transaction "begin" and "commit", it
runs fine.
Any ideas on what might cause this?
Thanks,
-Mike
private void runQuery() throws AppException {
PersistenceManager pm=JDOFactory.getPersistenceManager();
Transaction tx = pm.currentTransaction();
tx.begin();
tx.commit();
Connection conn=null;
Long listrunid=new Long (281);
try {
conn = JDOFactory.getConnection();
String sql="update summaryreport set
totalforwarded=totalforwarded+1 where listrunid=listrun.id and
listrun.publicid=?";
PreparedStatement stmt = conn.prepareStatement(sql);
stmt.setLong(1, listrunid.longValue());
_log.debug("executing: "+stmt);
int result=stmt.executeUpdate();
_log.debug("done executing: "+stmt);
if (result==0) {
_log.error("Nothing to update for id="+listrunid);
catch (SQLException ex) {
_log.error("SQLException: "+ex.getMessage());
throw new AppException (ex.getMessage());
finally {
if (conn!=null) {
try {conn.close();}
catch(SQLException ex) {
_log.warn(ex.getMessage());
Mike BridgeHi Patrick,
You're right, that should be in a finally clause. However, my script seems
to hang after about 10 to 30 of the 1000 iterations.
-Mike
Patrick Linskey wrote:
Mike Bridge <[email protected]> writes:
Hi-
Here's a standalone program that shows the problem. If you remove the
"tx.begin()" and "tx.commit()" lines,
it seems to work fine. With them, I get some odd NullPointerExceptions at
the start, then later it hangs.FTR, it looks like the hang is caused by the bit where threadDone() is
only invoked when an exception is not thrown. If you move the
threadDone() invocation to a finally clause, the hang will probably go
away.
-Mike
import java.util.*;
import javax.jdo.*;
import java.sql.*;
import com.solarmetric.kodo.impl.jdbc.*;
* create table testtable (id INT, value INT);
* insert into testtable(id, value) VALUES (1,0);
public class ConcurrentTest {
private static JDBCPersistenceManagerFactory factory = null;
public boolean threadsaredone=false;
public int iterations=0;
public int threadsdone=0;
public static Connection getConnection() throws SQLException {
javax.sql.DataSource ds = (javax.sql.DataSource)
factory.getConnectionFactory();
return ds.getConnection ();
public static PersistenceManager getPersistenceManager () {
return factory.getPersistenceManager ();
static {
factory = new JDBCPersistenceManagerFactory ();
factory.setNontransactionalRead (true);
factory.setRetainValues (true);
factory.setOptimistic (true);
private void runQuery() {
PersistenceManager pm=getPersistenceManager();
Transaction tx = pm.currentTransaction();
tx.begin();
Connection conn=null;
PreparedStatement stmt=null;
int id=1;
try {
conn = getConnection();
if (conn==null) {
System.out.println("Connection is null");
System.exit(1);
String sql="update testtable set value=value+1 where id=?";
stmt= conn.prepareStatement(sql);
stmt.setLong(1, id);
// System.out.println("executing: "+stmt);
int result=stmt.executeUpdate();
// System.out.println("done executing: "+stmt);
if (result==0) {
System.out.println("Nothing to update for id="+id);
catch (SQLException ex) {
System.out.println("SQLException: "+ex.getMessage());
finally {
if (conn!=null) {
try {conn.close();}
catch(SQLException ex) {System.out.println(ex.getMessage());}
if (stmt!=null) {
try {stmt.close();}
catch(SQLException ex) {System.out.println(ex.getMessage());}
tx.commit();
public synchronized void threadDone(int threadid) {
threadsdone++;
System.out.println("Thread "+threadid+" is done");
public synchronized void iterationstarted() {
iterations++;
System.out.println(" ** Starting iteration "+iterations);
public void launch(int maxthreads, int repperthread) {
runQuery();
for (int i=0; i<maxthreads; i++) {
System.out.println("launching thread "+i);
Thread mythread=new MyThread(this, i, repperthread);
mythread.start();
while ( threadsdone<maxthreads ) {
try {
Thread.currentThread().sleep(2000);
catch (InterruptedException ex) {
System.out.println("Interrupted: "+ex.getMessage());
System.out.println("threads reported finished: "+threadsdone);
System.out.println("DONE!");
public static void main (String[] args) {
int maxthreads=10;
int repperthread=100;
ConcurrentTest ct=new ConcurrentTest();
ct.launch(maxthreads, repperthread);
private class MyThread extends Thread {
ConcurrentTest testobj;
int threadid;
int repetitions;
public MyThread(ConcurrentTest testobj, int threadid, int repetitions)
this.testobj=testobj;
this.threadid=threadid;
this.repetitions=repetitions;
public void run() {
try {
for (int i=0; i<repetitions; i++) {
iterationstarted();
System.out.println(" START iteration "+i+" for thread "+threadid);
testobj.runQuery();
System.out.println(" FINISH iteration "+i+" for thread "+threadid);
testobj.threadDone(threadid);
catch (Exception ex) {
ex.printStackTrace();
System.out.println("ERROR: "+ex.getMessage());
Patrick Linskey [email protected]
SolarMetric Inc. http://www.solarmetric.com
Mike Bridge -
Problems with postgresql contrib
Hi.
I've installed Arch on my computer but I'm having a problem now with postgresql and a missing library. I'm developing some add ons to Openbravo and I need to use postgresql and UUID that is provided by uuid-ossd.so lib that according to the docs on Openbravo and other sites is from postgresql-contrib package. The problem is that I've installed the contrib package on my Arch and there is nothing there regarding uuid!
I've tryed with the contrib package from pacman and even one from AUR but can't manage to have uuid-ossd.so lib .
How can I solve this problem? Any other package that provides this missing lib for postgresql?
Thanks,
MikeI'd suggest building PostgreSQL from source, and making sure you include the contrib you want before you compile. It's really quite easy, and gives you better control over your PG install, especially when major updates happen. (eg, 7.4 to 8.0)
Last edited by fukawi2 (2009-01-26 22:20:56) -
[SOLVED] Problem building exim 4.80.1 with postgresql lookup support
I am trying to build Exim 4.80.1 with postgresql lookup support and I don't need ldap lookup support anymore
I used the ABS folder for exim as a starting point
Specifically I tried building against postgresql-libs 9.1.3-1 and 9.2.1-2 (latest)
except for firefox and postgresql-libs (I reverted to 9.1.3 because thats the version running on my server) my system is fully updated - no packages from testing
After much googling and hours of trying, these are the adaptions to the makefile I think should work:
diff exim.Makefile exim.Makefile.orig
292c292
< # LOOKUP_LDAP=yes
> LOOKUP_LDAP=yes
298c298
< LOOKUP_PGSQL=yes
> # LOOKUP_PGSQL=yes
349,350d348
< LOOKUP_INCLUDE=-I /usr/include -I /usr/include/postgresql
<
352d349
< LOOKUP_LIBS=-L/usr/lib -lpq
I tried all kinds of modifications, also those from the outdated AUR package exim-postgres
but when I start 'makepkg -c', eventually this appears:
gcc -o exim
lookups/lookups.a(pgsql.o): In function `pgsql_tidy':
pgsql.c:(.text+0x188): undefined reference to `PQfinish'
lookups/lookups.a(pgsql.o): In function `perform_pgsql_search':
pgsql.c:(.text+0x451): undefined reference to `PQsetdbLogin'
pgsql.c:(.text+0x45c): undefined reference to `PQstatus'
pgsql.c:(.text+0x47b): undefined reference to `PQerrorMessage'
pgsql.c:(.text+0x49d): undefined reference to `PQfinish'
pgsql.c:(.text+0x4b4): undefined reference to `PQsetClientEncoding'
pgsql.c:(.text+0x4c6): undefined reference to `PQsetNoticeProcessor'
pgsql.c:(.text+0x51d): undefined reference to `PQexec'
pgsql.c:(.text+0x528): undefined reference to `PQresultStatus'
pgsql.c:(.text+0x541): undefined reference to `PQcmdTuples'
pgsql.c:(.text+0x598): undefined reference to `PQresultStatus'
pgsql.c:(.text+0x59f): undefined reference to `PQresStatus'
pgsql.c:(.text+0x5aa): undefined reference to `PQresultErrorMessage'
pgsql.c:(.text+0x5ea): undefined reference to `PQnfields'
pgsql.c:(.text+0x5fa): undefined reference to `PQntuples'
pgsql.c:(.text+0x659): undefined reference to `PQgetlength'
pgsql.c:(.text+0x66b): undefined reference to `PQgetvalue'
pgsql.c:(.text+0x695): undefined reference to `PQgetvalue'
pgsql.c:(.text+0x6ba): undefined reference to `PQfname'
pgsql.c:(.text+0x73d): undefined reference to `PQclear'
collect2: error: ld returned 1 exit status
make[1]: *** [exim] Error 1
make[1]: Leaving directory `/tmp/makepkg/src/exim-4.80.1/build-Linux-x86_64'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
Can someone point me in the right direction? I really don't know what to do anymore... Thanks a lot!
Last edited by maximax (2012-12-07 20:42:19)Ok, I found the problem.
The file exim.Makefile from ABS features the line
LOOKUP_LIBS=...
twice.
Once somewhere in the middle (where it belongs?) and then once more at the end of the file.
So there you go. Thanks everyone. -
Problem with lion server - profile, wiki , postgresql
I have problem with lion server:
- Profile Manager Error Reading Setting
- Wiki Error Reading Setting
org.postgresql.postgres[3163]: postgres_real cannot access the server configuration file "/var/pgsql/postgresql.conf": No such file or directoryI have problem with lion server:
- Profile Manager Error Reading Setting
- Wiki Error Reading Setting
org.postgresql.postgres[3163]: postgres_real cannot access the server configuration file "/var/pgsql/postgresql.conf": No such file or directory -
Problem with Crystal reports for Eclipse and Postgres-databases
Hi,
Is there a known problem when using a PostgreSQL-database to create a report with Crystal reports Plugin? When I drag a table, then occurs a error-windows, that the object can't created.
I have found a workaround for solving the problem. After new installing Eclipse Platform Version: 3.4.1 Build id: M20080911-1700 and Crystal reports Plugin 11.8.6.v1371 with JRE 1.6.0_01 the error message allways occurs, when I select a table from a PostgreSQL database (Version 8.2). After restarting eclipse you see the last selected tables in the field explorer and you can drag the table fields in the report. A repeated choice of the same table causes aliases for the table in the field explorer after restarting eclipse.
Error.log:
eclipse.buildId=M20080911-1700
java.version=1.6.0_01
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE Command-line arguments: -os win32 -ws win32 -arch x86
Error
Tue Dec 16 14:03:53 CET 2008
Verursacht durch: java.lang.IllegalArgumentException
com.businessobjects.crystalreports.designer.core.ReportException: java.lang.IllegalArgumentException
at com.businessobjects.crystalreports.designer.core.ExceptionFactory.B(Unknown Source) at com.businessobjects.crystalreports.designer.core.ExceptionFactory.create(Unknown Source) at com.businessobjects.crystalreports.designer.core.elements.data.TableElement.add(Unknown Source) at com.businessobjects.crystalreports.designer.core.commands.AddCommand.doCommand(Unknown Source) at com.businessobjects.crystalreports.designer.core.commands.ReportCommand.C(Unknown Source) at com.businessobjects.crystalreports.designer.core.commands.ReportCommand.execute(Unknown Source) at com.businessobjects.crystalreports.designer.CoreCommand.execute(Unknown Source) at com.businessobjects.crystalreports.designer.dseintegration.DSEDropHandler.drop(Unknown Source) at org.eclipse.jface.util.DelegatingDropAdapter$3.run(DelegatingDropAdapter.java:211)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:880)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.util.DelegatingDropAdapter.drop(DelegatingDropAdapter.java:209)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:770)
at org.eclipse.swt.dnd.DropTarget.Drop(DropTarget.java:455)
at org.eclipse.swt.dnd.DropTarget$3.method6(DropTarget.java:257)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:119)
at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method) at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:362)
at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:288)
at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:171)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.IllegalArgumentException---- Error code:-2147467259 Error code name:failed at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source) at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source) at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.ag.a(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.bu.if(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.bu.void(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.a6.for(Unknown Source) at com.crystaldecisions.proxy.remoteagent.u.performDo(Unknown Source)
Best Regards
ArnoldYour issue appears to be a Crystal Reports for Eclipse report designer thing, and not a JRC runtime thing. The JRC runtime does support Type 4 JDBC drivers, but all modern PostgreSQL drivers are Type 4.
The current report designer is more restrictive than the JRC runtime - and PostgreSQL, being not on the supported platforms list, has never been tested with the embedded designer.
Unless there's anybody out there with experience with PostgreSQL and CR4E designer, who would be willing to share their experiences.
Sincerely,
Ted Ueda -
EJB 3.0 - problem with persistence unit.
Hi everybody, I got this problem I would like you to help me.
I'm doing a proyect with EJB 3.0 using Netbeans 5.5 and Jboss
The data source is MySQL.
When I deploy the proyect, the Jboss Log show me this:
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
State: FAILED
Reason: javax.naming.NameNotFoundException: jdbc not bound
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
Depends On Me:
jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
[Please help me, I'm kind of new in EJB]
[ENTIRE JBOSS LOG]
10:08:37,375 INFO [TomcatDeployer] undeploy, ctxPath=/DecmoCVLAC-war, warUrl=.../tmp/deploy/tmp16823DecmoCVLAC.ear-contents/DecmoCVLAC-war-exp.war/
10:08:37,515 INFO [EARDeployer] Undeploying J2EE application, destroy step: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
10:08:37,515 INFO [EARDeployer] Undeployed J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
10:08:37,546 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
10:08:39,281 INFO [Ejb3Deployment] EJB3 deployment time took: 47
10:08:39,296 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU with dependencies:
10:08:39,296 INFO [JmxKernelAbstraction] jboss.jca:name=jdbc/connectionPool,service=ManagedConnectionFactory
10:08:39,312 WARN [ServiceController] Problem starting service persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
javax.naming.NameNotFoundException: jdbc not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:240)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:99)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy91.start(Unknown Source)
at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:82)
at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:626)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:475)
at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy36.start(Unknown Source)
at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy37.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
10:08:39,812 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3 with dependencies:
10:08:39,812 INFO [JmxKernelAbstraction] persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
10:08:39,828 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3 with dependencies:
10:08:39,828 INFO [JmxKernelAbstraction] persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
10:08:39,859 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp16824DecmoCVLAC.ear-contents/DecmoCVLAC-ejb.jar
10:08:39,859 INFO [TomcatDeployer] deploy, ctxPath=/DecmoCVLAC-war, warUrl=.../tmp/deploy/tmp16824DecmoCVLAC.ear-contents/DecmoCVLAC-war-exp.war/
10:08:40,046 INFO [EARDeployer] Started J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
10:08:40,062 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
State: FAILED
Reason: javax.naming.NameNotFoundException: jdbc not bound
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
Depends On Me:
jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
ObjectName: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
ObjectName: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
State: FAILED
Reason: javax.naming.NameNotFoundException: jdbc not bound
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
Depends On Me:
jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3Reason: javax.naming.NameNotFoundException: jdbc not bound
Although i am quite new to this as well i would say that there is a problem with your connection with the database.
It seems it cannot connect to Mysql.
have you download the mysql package library and imported it ?
Also in your deploy folder in you Jboss
have you altered the jdbc to connect to you database in your dataset ? ( i am not sure about mysql, but postgre reguired this)
Most probably it would be the same in mysql.
<connection-url>jdbc:postgresql://127.0.0.1:5432/Dissertation</connection-url>
Not sure if this is what you reguire, i am new at this my self -
Configuring DBAT 9.1.0.5 connector with PostgreSQL database in OIM 11g
Hi,
I am trying to configure the DBAT 9.1.0.5 connector with PostgreSQL database in OIM 11g (11.1.1.5.0), thou' in the connector document the suppot for this postgres is not mentioned.
So, as mentioned for other databases that the JDBC driver has to be copied to $JAVA_HOME/jre/lib/ext, I have also copied the postgres driver to the specific folder but while trying to configure the connector, I am getting the error as 'No suitable driver found'. Following is the stacktrace snippet.
SEVERE: Class/Method: DBFacade/getConnection encounter some problems: No suitable driver found for jdbc:postgres://funereus.stadi.sonera.fi:5432/DEV1_DIGSIG
java.sql.SQLException: No suitable driver found for jdbc:postgres://funereus.stadi.sonera.fi:5432/DEV1_DIGSIG
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:51)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:840)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
at com.thortech.xl.gc.impl.common.DBFacade.getConnection(Unknown Source)
at com.thortech.xl.gc.impl.common.DBFacade.getMetadata(Unknown Source)
at com.thortech.xl.gc.impl.common.DBFacade.getDBType(Unknown Source)
at com.thortech.xl.gc.impl.common.DBFacade.getSchema(Unknown Source)
at com.thortech.xl.gc.impl.recon.DBReconTransportProvider.detectMetadata(Unknown Source)
at com.thortech.xl.gc.impl.recon.DBReconTransportProvider.getMetadata(Unknown Source)
at com.thortech.xl.webclient.actions.CreateConnectorAction.getGenericAdapter(CreateConnectorAction.java:2202)
at com.thortech.xl.webclient.actions.CreateConnectorAction.imageScreen(CreateConnectorAction.java:1196)
at com.thortech.xl.webclient.actions.CreateConnectorAction.goNext(CreateConnectorAction.java:521)
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:597)
Caused by: java.sql.SQLException: No suitable driver found for jdbc:postgres://funereus.stadi.sonera.fi:5432/DEV1_DIGSIG
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:51)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:840)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
... 62 more
SEVERE: Class/Method: CreateGenConnectorAction/imageScreen encounter some problems: Provider Exception
java.lang.Exception: Provider Exception
at com.thortech.xl.webclient.actions.CreateConnectorAction.getGenericAdapter(CreateConnectorAction.java:2265)
at com.thortech.xl.webclient.actions.CreateConnectorAction.imageScreen(CreateConnectorAction.java:1196)
at com.thortech.xl.webclient.actions.CreateConnectorAction.goNext(CreateConnectorAction.java:521)
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:597)
I am using postgresql-8.4-703.jdbc4.jar and Driver class as org.postgresql.Driver
some suggestions on this would be highly appreciated.
Thanks
SidThanks guys for the quick responses.
But I have tried both the options for putting the jar in Third Party and also by uploading using the OOTB utility UploadJar.sh.
But it is giving the same error.
I have tired rebouncing the server and also Purge cached, but no success.
Just to mention again, I have tried with all the last 3 postgres JDBC4 driver available on the site (u mentioned).
So, any other clue?
Thanks in advance. -
WebRowSet Problem with database columns defined as TEXT??
Hello,
Can somebody help me on this subject. (http://forum.java.sun.com/thread.jspa?forumID=31&threadID=778586)
I have the same problem with TEXT column when I try to populate the WebRowset.
Thanks,
StephaneOK,
I change my postgresql driver for the lastest version (postgresql-8.2-506.jdbc3.jar) for JVM 1.5 and it's find...
This driver support the javax.sql.
St�phane
Edited by: Borealis on Oct 15, 2007 12:43 PM -
Hi all,
I am experiencing problems with my J2SDK setup. I think my problem due to many previous versions of JDKs.
I have re-installed JSDK1.4.2_03, set the "path" variable to "C:\JSDK1.4.2_03".
When I compile using "javac" I get an error saying "javac" is not recognised.
When I compile using "C:\j2sdk1.4.2_03\bin\javac Freq.java" no error is thrown.
Every time I try to run a java file, I always get the NoClassDefFound error. When run with the -verbose option, files are loaded from C:\Program Files\Java\j2re1.4.2_03\bin - is this correct?
I have removed all previous references to java in the registry editor.
I would be really grateful to you (and anyone else) for help with this problem.
Regards,
VipulHi,
Thanks for getting back to me. I have altered my CLASSPATH and path. Unfortunately it is still not working. I have run java using the full path to the jdk and the jars are loaded in from the right place, but I still get the noclassdeffound error. I have removed all references to CLASSPATH and PATH. When I run with the verbose option (with no ref to the jdk in any variable), the jar files are loaded in from C\program files\java\j2re1.4.2_03! But there is no reference to this location in any variable.My j2sdk is installed in C:\j2sdk1.4.2_03.
Currently ,
CLASSPATH =".;C:\Program Files\eclipse\plugins\org.eclipse.swt.win32_2.1.1\ws\win32\swt.jar;C:\cygwin\usr\share\postgresql\java\postgresql.jar; C:\Program Files\Database Report Writers\DB Drivers\pg73jdbc.jar "
And PATH = " %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\cygwin\bin;C:\Program Files\Common Files\Adaptec Shared\System;C:\MSSQL7\BINN;C:\tools\ant\apache-ant-1.5.3-1\bin;C:\Program Files\cvsnt;C:\tools\ant\apache-ant-1.5.3-1\bin;C:\tools\maven\maven-1.0-beta-11-SNAPSHOT\bin "
Please help.
Ciao,
Vipul -
Problem with reading data over dblink
Hi,
I have a dblink from Oracle 10.2.0.3 db(on windows) to Postgresql 8.3.3 (on centos 4) .
When trying reading data from Postgresql table , I cannot read varchar colums, in he result set there is no error message.
In the hs trace file it says "unrecognized data type" for the varchar colums.
I tried character,text data types, but the error message is the same.
With Oracle 9.2.0.8 ( on hp/ux platform) there is no problem reading that data types.
How can I handle this problem?
ThanksHi,
i had a similiar problem with 10.2.0.3 querying MS/SQL2000 and Oracle support told me it is a bug which was fixed in 10.2.0.4, however, i couldn't upgrade as SAP was not certified with this version so i had configured a workarround with Oracle support:
create a DB link from 10.2.0.3 to a 9.2.0.8 DB, in the 9.2.0.8 i have created synonyms through DB link (HS) to the MS/SQL and it solved the problem.
i know it is not a best solution but it works and production system continue to function.
dBarak. -
Running procedures from XSQL with PostgreSQL
All,
We are using XSQL with postgreSQL. It works fine till we try to run a postgreSQL Function. We setup the function to return a ref cursor, but it still didn't work. Below is the xsql file. Any help would be appreciated. Thanks.
<?xml version="1.0"?>
<page connection="pg-sunpos5" xmlns:xsql="urn:oracle-xsql">
<xsql:ref-cursor-function max-rows="5" tag-case="lower" null-indicator="yes">
card_type_f()
</xsql:ref-cursor-function>
</page>Here is a little more information on the problem. The definition of the postgresql function being run is below. Also the error message we receive when running the xsql template. Thanks.
CREATE FUNCTION card_type_f() RETURNS refcursor AS '
DECLARE
rc refcursor;
BEGIN
OPEN rc FOR SELECT * from card_type;
RETURN rc;
END;
' LANGUAGE plpgsql;
page>
<xsql-error action="xsql:ref-cursor-function">
<statement>card_type_f();</statement>
<message>
This Statement [] defines a procedure call (needs ?= call <stmt> to be considered a function.
</message>
</xsql-error>
</page> -
I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
Thank you in advance,
LeftyThis was one solution from the socket programming forum, have you tried this??
public Thread MyThread extends Thread{
boolean active = true;
public void run(){
ss.setSoTimeout(90);
while (active){
try{
serverSocket = ss.accept();
catch (SocketTimeoutException ste){
// do nothing
// interrupt thread
public void deactivate(){
active = false;
// you gotta sleep for a time longer than the
// accept() timeout to make sure that timeout is finished.
try{
sleep(91);
}catch (InterruptedException ie){
interrupt();
} -
Problem with Threads and a static variable
I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
Code functionality:
A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
The problem as far I understand is:
Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
Thanks,
B.D.
Code:
private static volatile boolean bChanged = false;
private static Thread objMainProcess;
protected static void Init(){
objMainProcess = new Thread() {
public void run() {
while( objMainProcess == Thread.currentThread() ) {
GetState();
objMainProcess.setDaemon( true );
objMainProcess.start();
public static void initStatusTimer(){
if(objTimer == null)
objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
public void actionPerformed( java.awt.event.ActionEvent evt){
SetState();
private static void SetState(){
if( objMainProcess == null ) return;
synchronized( objMainProcess ) {
bChanged = true;
try{
objMainProcess.notify();
}catch( IllegalMonitorStateException e ) {}
private static boolean GetState() {
if( objMainProcess == null ) return false;
synchronized( objMainProcess ) {
if( bChanged) {
SendMessage();
bChanged = false;
return true;
try {
objMainProcess.wait();
}catch( InterruptedException e ) {}
return false;
}Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
Again as you said, There is a reason I can't call sendMessage() inside setState().
The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
Thanks,
B.D. -
Problem with threads running javaw
Hi,
Having a problem with multi thread programming using client server sockets. The program works find when starting the the application in a console using java muti.java , but when using javaw multi.java the program doesnt die and have to kill it in the task manager. The program doesnt display any of my gui error messages either when the server disconnect the client. all works find in a console. any advice on this as I havent been able to understand why this is happening? any comment would be appreciated.
troy.troy,
Try and post a minimum code sample of your app which
does not work.
When using javaw, make sure you redirect the standard
error and standard output streams to file.
Graeme.Hi Graeme,
I dont understand what you mean by redirection to file? some of my code below.
The code works fine under a console, code is supposed to exit when the client (the other server )disconnects. the problem is that but the clientworker side of the code still works. which under console it doesnt.
public class Server{
ServerSocket aServerSocket;
Socket dianosticsSocket;
Socket nPortExpress;
ClientListener aClientListener;
LinkedList queue = new LinkedList();
int port = 0;
int clientPort = 0;
String clientName = null;
boolean serverAlive = true;
* Server constructor generates a server
* Socket and then starts a client threads.
* @param aPort socket port of local machine.
public Server(int aPort, String aClientName, int aClientPort){
port = aPort;
clientName = aClientName;
clientPort = aClientPort;
try{
// create a new thread
aServerSocket = new ServerSocket(port) ;
// connect to the nPortExpress
aClientListener = new ClientListener(InetAddress.getByName(clientName), clientPort, queue,this);
// aClientListener.setDaemon(true);
aClientListener.start();
// start a dianostic port
DiagnosticsServer aDiagnosticsServer = new DiagnosticsServer(port,queue,aClientListener);
// System.out.println("Server is running on port " + port + "...");
// System.out.println("Connect to nPort");
catch(Exception e)
// System.out.println("ERROR: Server port " + port + " not available");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Server port " + port + " not available", JOptionPane.ERROR_MESSAGE);
serverAlive = false;
System.exit(1);
while(serverAlive&&aClientListener.hostSocket.isConnected()){
try{
// connect the client
Socket aClient = aServerSocket.accept();
//System.out.println("open client connection");
//System.out.println("client local: "+ aClient.getLocalAddress().toString());
// System.out.println("client localport: "+ aClient.getLocalPort());
// System.out.println("client : "+ aClient.getInetAddress().toString());
// System.out.println("client port: "+ aClient.getLocalPort());
// make a new client thread
ClientWorker clientThread = new ClientWorker(aClient, queue, aClientListener, false);
// start thread
clientThread.start();
catch(Exception e)
//System.out.println("ERROR: Client connection failure");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client connection failure", JOptionPane.ERROR_MESSAGE);
}// end while
} // end constructor Server
void serverExit(){
JOptionPane.showMessageDialog(null, "Server ","ERROR: nPort Failure", JOptionPane.ERROR_MESSAGE);
System.exit(1);
}// end class Server
*** connect to another server
public class ClientListener extends Thread{
InetAddress hostName;
int hostPort;
Socket hostSocket;
BufferedReader in;
PrintWriter out;
boolean loggedIn;
LinkedList queue; // reference to Server queue
Server serverRef; // reference to main server
* ClientListener connects to the host server.
* @param aHostName is the name of the host eg server name or IP address.
* @param aHostPort is a port number of the host.
* @param aLoginName is the users login name.
public ClientListener(InetAddress aHostName, int aHostPort,LinkedList aQueue,Server aServer) // reference to Server queue)
hostName = aHostName;
hostPort = aHostPort;
queue = aQueue;
serverRef = aServer;
// connect to the server
try{
hostSocket = new Socket(hostName, hostPort);
catch(IOException e){
//System.out.println("ERROR: Connection Host Failed");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort Failed", JOptionPane.ERROR_MESSAGE);
System.exit(0);
} // end constructor ClientListener
** multi client connection server
ClientWorker(Socket aSocket,LinkedList aQueue, ClientListener aClientListener, boolean diagnostics){
queue = aQueue;
addToQueue(this);
client = aSocket;
clientRef = aClientListener;
aDiagnostic = diagnostics;
} // end constructor ClientWorker
* run method is the main loop of the server program
* in change of handle new client connection as well
* as handle all messages and errors.
public void run(){
boolean alive = true;
String aSubString = "";
in = null;
out = null;
loginName = "";
loggedIn = false;
while (alive && client.isConnected()&& clientRef.hostSocket.isConnected()){
try{
in = new BufferedReader(new InputStreamReader(client.getInputStream()));
out = new PrintWriter(new OutputStreamWriter(client.getOutputStream()));
if(aDiagnostic){
out.println("WELCOME to diagnostics");
broadCastDia("Connect : diagnostics "+client.getInetAddress().toString());
out.flush();
else {
out.println("WELCOME to Troy's Server");
broadCastDia("Connect : client "+client.getInetAddress().toString());
out.flush();
String line;
while(((line = in.readLine())!= null)){
StringTokenizer aStringToken = new StringTokenizer(line, " ");
if(!aDiagnostic){
broadCastDia(line);
clientRef.sendMessage(line); // send mesage out to netExpress
out.println(line);
out.flush();
else{
if(line.equals("GETIPS"))
getIPs();
else{
clientRef.sendMessage(line); // send mesage out to netExpress
out.println(line);
out.flush();
} // end while
catch(Exception e){
// System.out.println("ERROR:Client Connection reset");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR:Client Connection reset", JOptionPane.ERROR_MESSAGE);
try{
if(aDiagnostic){
broadCastDia("Disconnect : diagnostics "+client.getInetAddress().toString());
out.flush();
else {
broadCastDia("Disconnect : client "+client.getInetAddress().toString());
out.flush();
// close the buffers and connection;
in.close();
out.close();
client.close();
// System.out.println("out");
// remove from list
removeThreadQueue(this);
alive = false;
catch(Exception e){
// System.out.println("ERROR: Client Connection reset failure");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client Connection reset failure", JOptionPane.ERROR_MESSAGE);
}// end while
} // end method run
* method run - Generates io stream for communicating with the server and
* starts the client gui. Run also parses the input commands from the server.
public void run(){
boolean alive = true;
try{
// begin to life the gui
// aGuiClient = new ClientGui(hostName.getHostName(), hostPort, loginName, this);
// aGuiClient.show();
in = new BufferedReader(new InputStreamReader(hostSocket.getInputStream()));
out = new PrintWriter(new OutputStreamWriter(hostSocket.getOutputStream()));
while (alive && hostSocket.isConnected()){
String line;
while(((line = in.readLine())!= null)){
System.out.println(line);
broadCast(line);
} // end while
} // end while
catch(Exception e){
// System.out.println("ERRORa Connection to host reset");
JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort reset", JOptionPane.ERROR_MESSAGE);
try{
hostSocket.close();
}catch(Exception a){
JOptionPane.showMessageDialog(null, (a.toString()),"ERROR: Exception", JOptionPane.ERROR_MESSAGE);
alive = false;
System.exit(1);
} // end method run
Maybe you are looking for
-
How to convert (YYYY-MM-DD) to (DD-MM-YYYY)
Hi Guys, I have one doubt on WDJ, While exporting data into Excel Sheet having date format is showing like the format (YYYY-MM-DD). But I need to convert into this format (DD-MM-YYYY). Can any one suggest me? How to convert (YYYY-MM-DD) to (DD-MM-YYY
-
Education Cess and Sec Edu Cess not appearing in Excise Invoice
Hi all i have a small issue and I am not very familiar with the CIN configuration. When I capture the excise invoice, only Basic Excise Duty is appearing in the invoice but Education Cess and Secondary Education Cess which is there in Sales Invoice i
-
How to change data type for a field?
Hi Experts, I have one std screen having one field having numeric type. So it will accept only numeric value. Remember I am using standard transaction. Now my user wants to enter the special character like + or - in that field(having data type numeri
-
How to install IDES on ECC 5.0?
Hello, We just installed ECC 5.0 and we would like to add an IDES client, do we have to réinstall everything? How does it work? Thanks
-
Broadcasting jobs taking very long timel
Hi Gurus, We are using broadcasting funcitonality in our project , we use to have daily boradcasting jobs which will distribute the workbooks on daily basis. Recently we observed that few jobs are taking very long time i.e 1.Say Job X have 10 receipe