Re: Pax-Exam - J8 - How to include javax.activation on the classpath?
Please Ignore. The problem was in the bundle Imports. No need for systemPackages. Cheers, Dutch. On Thursday, January 17, 2019 at 8:59:11 PM UTC-5, Dutch Dude wrote: > > Hi, > > This seems like a simple problem, but I am banging my head agains the wall > for two days now and I can't figure it out. > > I am trying to write an integration test with commons-email, which depends > on javax.activation... > > systemPackages("javax.activation", "com.sun.*"), > ... > mavenBundle("javax.activation", "javax.activation-api", "1.2.0"), > > mavenBundle("com.sun.mail", "javax.mail", "1.5.6"), > > mavenBundle("org.apache.commons", "commons-email", "1.5"), > > mavenBundle("com.sun.activation", "jakarta.activation", "1.2.1"), > > I keep getting this error though: > [RMI TCP Connection(1)-127.0.0.1] ERROR my.impl - [MyServiceImpl(0)] > Error during instantiation of the implementation object > java.lang.NoClassDefFoundError: javax/activation/DataSource > at java.lang.Class.getDeclaredConstructors0(Native Method) >... > > If I add javax.activation to the Import-Packes the runtime fails because > the class cannot be instantiated. I assume because of some interface > conflict but I don't know that for sure. > > It must be something obvious, but I don't see it (anymore). > > Any help or insight is greatly appreciated. > > > Pax-Exam: tried versions: 4.10.0 and 4.13.1 > Java 1.8.0_92 > > > Kind Regards, > > Dutch. > > -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Pax-Exam - J8 - How to include javax.activation on the classpath?
Hi, This seems like a simple problem, but I am banging my head agains the wall for two days now and I can't figure it out. I am trying to write an integration test with commons-email, which depends on javax.activation... systemPackages("javax.activation", "com.sun.*"), ... mavenBundle("javax.activation", "javax.activation-api", "1.2.0"), mavenBundle("com.sun.mail", "javax.mail", "1.5.6"), mavenBundle("org.apache.commons", "commons-email", "1.5"), mavenBundle("com.sun.activation", "jakarta.activation", "1.2.1"), I keep getting this error though: [RMI TCP Connection(1)-127.0.0.1] ERROR my.impl - [MyServiceImpl(0)] Error during instantiation of the implementation object java.lang.NoClassDefFoundError: javax/activation/DataSource at java.lang.Class.getDeclaredConstructors0(Native Method) ... If I add javax.activation to the Import-Packes the runtime fails because the class cannot be instantiated. I assume because of some interface conflict but I don't know that for sure. It must be something obvious, but I don't see it (anymore). Any help or insight is greatly appreciated. Pax-Exam: tried versions: 4.10.0 and 4.13.1 Java 1.8.0_92 Kind Regards, Dutch. -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[pax=jdbc-1.1.0] 65k DB connections with pool of 25.
All - I have been struggling with DB connection errors with PAX-JDBC for a while now, and I couldn't really get my mind around it. Just today I noticed something really bizar. On a Windows Server, PAX-JDBC (sometimes) ends up in a loop creating DB connections until the OS runs out of resources. This is the error message: 2017-06-19 16:34:53,676 [ERROR] qtp1288985130-157 MyRepositoryImpl:686 Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217 -774c696): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The driver was unable to create a connection due to an inability to establish the client portion of a socket. This is usually caused by a limit on the number of sockets imposed by the operating system. This limit is usually configurable. For Unix-based platforms, see the manual page for the 'ulimit' command. Kernel or system reconfiguration may also be required. For Windows-based platforms, see Microsoft Knowledge Base Article 196271 ( Q196271). Error Code: 0 When I do a netstat -an | find "" I see thousands and thousands of connections (or at least attempted connections, I don't recall the state of the connection). One other interesting thing to note is that if I increase the maxTotal AND the maxIdle values in the config below, the problem doesn't happen, or at least a lot less frequent. osgi.jdbc.driver.class=com.mysql.jdbc.Driver url=jdbc:mysql://my_db_server:3306/mydb?useSSL=false dataSourceName=jdbc/mynonjta user= password= databaseName= pool=dbcp2 #jdbc.pool.timeBetweenEvictionRunsMillis=1000 #jdbc.pool.softMinEvictableIdleTimeMillis=7000 jdbc.pool.maxTotal=25 jdbc.pool.maxIdle=25 #jdbc.pool.minIdle=10 Could it be that the maxTotal and maxIdle being the same causes some havoc here? The idea is to never close connections once they are open, but I might have misunderstood the settings for these properties. OS Microsof Windows Server 2012 R2. Java 8 PAX-JDBC 1.1.0 Please Advise. It seems fairly reproducible so let me know when there is anything you would like me to test. Kind Regards, Erwin -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[pax-jdbc] How to properly configure connection pool with mySQL
Hi, What is the proper way to configure a connection-pool with pax-jdbc-1.1.0? With the config below I would expect that the #connections grows to a peak, and stays there but I still see the DB connections being closed an re-created like crazy... eventually causing a resource issue on the (Windows) DB server. I am sure I am missing something, but I haven't been able to figure it out yet. I am using mySQL driver 5.1.40 and PAX-JDBC 1.1.0. Any help is greatly appreciated. Erwin #https://ops4j1.jira.com/wiki/display/PAXJDBC/Pooling+and+XA+support+in+1.0.0 osgi.jdbc.driver.class=com.mysql.jdbc.Driver url=jdbc:mysql://my_db_server:3306/my_db?useSSL=false dataSourceName=jdbc/mynonjta user= password= databaseName=my_db pool=dbcp2 #jdbc.pool.timeBetweenEvictionRunsMillis=1000 #jdbc.pool.softMinEvictableIdleTimeMillis=7000 jdbc.pool.maxTotal=50 jdbc.pool.maxIdle=50 #jdbc.pool.minIdle=10 These are the DB bundles. 59 ACTIVE org.ops4j.pax.jdbc_1.1.0 60 ACTIVE org.ops4j.pax.jdbc.pool.dbcp2_1.1.0 61 ACTIVE org.ops4j.pax.jdbc.config_1.1.0 62 ACTIVE org.ops4j.pax.jdbc.pool.common_1.1.0 63 ACTIVE org.ops4j.pax.jdbc.mysql_1.1.0 66 ACTIVE com.mysql.jdbc_5.1.40 -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [pax-jdbc] mysql driver lockup
Well, After a lot of head scratching, I completely rebooted the DB server machine, and that solved the problem (at least for now). Even though MySQLWorkbench only showed a handful connection it looks like somehow the OS or DB engine ran out of 'something'. Thanks for your attention, Erwin On Tuesday, May 23, 2017 at 9:06:23 AM UTC-4, Dutch Dude wrote: > > Hi - > > I am experiencing a driver lockup with pax-jdbc 1.1.0. It always seems to > happen when a new connection is being created (which, BTW shouldn’t happen > that often because I should be using a connection pool). > It does’t happen all the time, but often enough to take the entire > application down. > > Would anyone have a suggestion how/where to start debugging this? > > All the relevant info should be below. > > This is the thread dump, starting with the entityTransaction.commit() > Thread [qtp149708915-159] (Suspended) > owns: ReadAheadInputStream (id=912) > owns: JDBC4Connection (id=913) > owns: DatabaseAccessor (id=914) > owns: SessionRepositoryImpl (id=718) > owns: PhaseInterceptorChain (id=915) > SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) line > : not available [native method] > SocketInputStream.socketRead(FileDescriptor, byte[], int, int, int) line: > 116 > SocketInputStream.read(byte[], int, int, int) line: 170 > SocketInputStream.read(byte[], int, int) line: 141 > ReadAheadInputStream.fill(int) line: 101 > ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(byte[], int, int > ) line: 144 > ReadAheadInputStream.read(byte[], int, int) line: 174 > MysqlIO.readFully(InputStream, byte[], int, int) line: 3005 > MysqlIO.readPacket() line: 567 > MysqlIO.doHandshake(String, String, String) line: 1016 > JDBC4Connection(ConnectionImpl).coreConnect(Properties) line: 2253 > JDBC4Connection(ConnectionImpl).connectOneTryOnly(boolean, Properties) > line: 2284 > JDBC4Connection(ConnectionImpl).createNewIO(boolean) line: 2083 > JDBC4Connection(ConnectionImpl).(String, int, Properties, String, > String) line: 806 > JDBC4Connection.(String, int, Properties, String, String) line: 47 > NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line > : not available [native method] > NativeConstructorAccessorImpl.newInstance(Object[]) line: 62 > DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 45 > Constructor.newInstance(Object...) line: 423 > Util.handleNewInstance(Constructor, Object[], ExceptionInterceptor) > line: 425 > ConnectionImpl.getInstance(String, int, Properties, String, String) line: > 410 > NonRegisteringDriver.connect(String, Properties) line: 328 > MysqlDataSource.getConnection(Properties) line: 428 > MysqlDataSource.getConnection(String, String) line: 136 > MysqlDataSource.getConnection() line: 107 > DataSourceConnectionFactory.createConnection() line: 44 > PoolableConnectionFactory.makeObject() line: 256 > GenericObjectPool.create() line: 868 > GenericObjectPool.borrowObject(long) line: 435 > GenericObjectPool.borrowObject() line: 363 > PoolingDataSource.getConnection() line: 134 > JNDIConnector.connect(Properties, Session) line: 135 > DatabaseLogin(DatasourceLogin).connectToDatasource(Accessor, Session) > line: 162 > DatabaseAccessor(DatasourceAccessor).connectInternal(Login, > AbstractSession) line: 346 > DatabaseAccessor.connectInternal(Login, AbstractSession) line: 309 > DatabaseAccessor(DatasourceAccessor).reconnect(AbstractSession) line: 581 > DatabaseAccessor.reconnect(AbstractSession) line: 1634 > DatabaseAccessor(DatasourceAccessor).incrementCallCount(AbstractSession) > line: 321 > DatabaseAccessor.basicExecuteCall(Call, AbstractRecord, AbstractSession, > boolean) line: 615 > DatabaseAccessor.executeCall(Call, AbstractRecord, AbstractSession) line: > 560 > ServerSession(AbstractSession).basicExecuteCall(Call, AbstractRecord, > DatabaseQuery) line: 2055 > ServerSession.executeCall(Call, AbstractRecord, DatabaseQuery) line: 570 > IsolatedClientSession(ClientSession).executeCall(Call, AbstractRecord, > DatabaseQuery) line: 258 > ExpressionQueryMechanism(DatasourceCallQueryMechanism).executeCall( > DatasourceCall) line: 242 > ExpressionQueryMechanism(DatasourceCallQueryMechanism).executeCall() line > : 228 > ExpressionQueryMechanism(DatasourceCallQueryMechanism). > selectRowForDoesExist(DatabaseField) line: 736 > DoesExistQuery.executeDatabaseQuery() line: 241 > DoesExistQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) > line: 904 > DoesExistQuery(DatabaseQuery).executeInUnitOfWork(UnitOfWorkImpl, > AbstractRecord) line: 803 > RepeatableWriteUnitOfWork(UnitOfWorkImpl
[pax-jdbc] mysql driver lockup
Hi - I am experiencing a driver lockup with pax-jdbc 1.1.0. It always seems to happen when a new connection is being created (which, BTW shouldn’t happen that often because I should be using a connection pool). It does’t happen all the time, but often enough to take the entire application down. Would anyone have a suggestion how/where to start debugging this? All the relevant info should be below. This is the thread dump, starting with the entityTransaction.commit() Thread [qtp149708915-159] (Suspended) owns: ReadAheadInputStream (id=912) owns: JDBC4Connection (id=913) owns: DatabaseAccessor (id=914) owns: SessionRepositoryImpl (id=718) owns: PhaseInterceptorChain (id=915) SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) line: not available [native method] SocketInputStream.socketRead(FileDescriptor, byte[], int, int, int) line: 116 SocketInputStream.read(byte[], int, int, int) line: 170 SocketInputStream.read(byte[], int, int) line: 141 ReadAheadInputStream.fill(int) line: 101 ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(byte[], int, int) line: 144 ReadAheadInputStream.read(byte[], int, int) line: 174 MysqlIO.readFully(InputStream, byte[], int, int) line: 3005 MysqlIO.readPacket() line: 567 MysqlIO.doHandshake(String, String, String) line: 1016 JDBC4Connection(ConnectionImpl).coreConnect(Properties) line: 2253 JDBC4Connection(ConnectionImpl).connectOneTryOnly(boolean, Properties) line : 2284 JDBC4Connection(ConnectionImpl).createNewIO(boolean) line: 2083 JDBC4Connection(ConnectionImpl).(String, int, Properties, String, String) line: 806 JDBC4Connection.(String, int, Properties, String, String) line: 47 NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not available [native method] NativeConstructorAccessorImpl.newInstance(Object[]) line: 62 DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 45 Constructor.newInstance(Object...) line: 423 Util.handleNewInstance(Constructor, Object[], ExceptionInterceptor) line : 425 ConnectionImpl.getInstance(String, int, Properties, String, String) line: 410 NonRegisteringDriver.connect(String, Properties) line: 328 MysqlDataSource.getConnection(Properties) line: 428 MysqlDataSource.getConnection(String, String) line: 136 MysqlDataSource.getConnection() line: 107 DataSourceConnectionFactory.createConnection() line: 44 PoolableConnectionFactory.makeObject() line: 256 GenericObjectPool.create() line: 868 GenericObjectPool.borrowObject(long) line: 435 GenericObjectPool.borrowObject() line: 363 PoolingDataSource.getConnection() line: 134 JNDIConnector.connect(Properties, Session) line: 135 DatabaseLogin(DatasourceLogin).connectToDatasource(Accessor, Session) line: 162 DatabaseAccessor(DatasourceAccessor).connectInternal(Login, AbstractSession ) line: 346 DatabaseAccessor.connectInternal(Login, AbstractSession) line: 309 DatabaseAccessor(DatasourceAccessor).reconnect(AbstractSession) line: 581 DatabaseAccessor.reconnect(AbstractSession) line: 1634 DatabaseAccessor(DatasourceAccessor).incrementCallCount(AbstractSession) line: 321 DatabaseAccessor.basicExecuteCall(Call, AbstractRecord, AbstractSession, boolean) line: 615 DatabaseAccessor.executeCall(Call, AbstractRecord, AbstractSession) line: 560 ServerSession(AbstractSession).basicExecuteCall(Call, AbstractRecord, DatabaseQuery) line: 2055 ServerSession.executeCall(Call, AbstractRecord, DatabaseQuery) line: 570 IsolatedClientSession(ClientSession).executeCall(Call, AbstractRecord, DatabaseQuery) line: 258 ExpressionQueryMechanism(DatasourceCallQueryMechanism).executeCall( DatasourceCall) line: 242 ExpressionQueryMechanism(DatasourceCallQueryMechanism).executeCall() line: 228 ExpressionQueryMechanism(DatasourceCallQueryMechanism). selectRowForDoesExist(DatabaseField) line: 736 DoesExistQuery.executeDatabaseQuery() line: 241 DoesExistQuery(DatabaseQuery).execute(AbstractSession, AbstractRecord) line : 904 DoesExistQuery(DatabaseQuery).executeInUnitOfWork(UnitOfWorkImpl, AbstractRecord) line: 803 RepeatableWriteUnitOfWork(UnitOfWorkImpl).internalExecuteQuery( DatabaseQuery, AbstractRecord) line: 2896 RepeatableWriteUnitOfWork(AbstractSession).executeQuery(DatabaseQuery, AbstractRecord, int) line: 1857 RepeatableWriteUnitOfWork(AbstractSession).executeQuery(DatabaseQuery, AbstractRecord) line: 1839 RepeatableWriteUnitOfWork(AbstractSession).executeQuery(DatabaseQuery) line : 1790 RepeatableWriteUnitOfWork(UnitOfWorkImpl). checkForUnregisteredExistingObject(Object) line: 785 RepeatableWriteUnitOfWork(UnitOfWorkImpl). discoverAndPersistUnregisteredNewObjects(Object, boolean, Map, Map, Map, Set ) line: 4192 ManyToOneMapping(ObjectReferenceMapping). cascadeDiscoverAndPersistUnregisteredNewObjects(Object, Map, Map, Map, UnitOfWorkImpl, boolean, Set) line: 951 ManyToOneMapping(ObjectReferenceMapping).
Re: PAX-EXAM: How to get equinox 3.10 to listen on telnet port in a forked container?
Never mind... just needed to add the gogo bundles... Duh. Cheers, Erwin On Tuesday, July 26, 2016 at 8:39:36 AM UTC-4, Dutch Dude wrote: > > Hi, > > I have tried a million (or so it feels...) options, but I can't get the > framework to listen on a console port. Equinox wants something like > '-console 2323' as application parameter but neither the vmOptions, > systemOptions or frameworkOptions give me that format. > > I must be missing something. > > This is my configuration (well, a snapshot of what I currently have) > > return options( > > vmOption("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8800"), > systemProperty("osgi.console").value("2323"), > systemProperty("osgi.console.enable.builtin").value("true"), > vmOption("-Xmx1024M"), > > frameworkProperty("osgi.console.enable.builtin").value("true"), > frameworkProperty("osgi.console").value("2324"), > > These are the VM options as reported by JConsole: > > -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8800 > -Xmx1024M -Dpax.swissbox.framework.rmi.port=21000 -Dosgi.console=2323 > -Dpax.exam.invoker=junit -Dpax.exam.service.timeout=1 > -Dosgi.console.enable.builtin=true > -Djava.protocol.handler.pkgs=org.ops4j.pax.url > -Dorg.ops4j.pax.logging.DefaultServiceLog.level=INFO - > Dpax.swissbox.framework.rmi.name > =ExamRemoteFramework-413ded52-a922-4825-bb6b-cce68fea01fe > > With this classpath: > > > /Users/erwin/.m2/repository/org/eclipse/birt/runtime/org.eclipse.osgi/3.10.2.v20150203-1939/org.eclipse.osgi-3.10.2.v20150203-1939.jar:/Users/erwin/.m2/repository/org/ops4j/pax/swissbox/pax-swissbox-framework/1.8.2/pax-swissbox-framework-1.8.2.jar:/Users/erwin/.m2/repository/org/ops4j/pax/swissbox/pax-swissbox-tracker/1.8.2/pax-swissbox-tracker-1.8.2.jar > > > Thanks for your time. > > Erwin > > -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
PAX-EXAM: How to get equinox 3.10 to listen on telnet port in a forked container?
Hi, I have tried a million (or so it feels...) options, but I can't get the framework to listen on a console port. Equinox wants something like '-console 2323' as application parameter but neither the vmOptions, systemOptions or frameworkOptions give me that format. I must be missing something. This is my configuration (well, a snapshot of what I currently have) return options( vmOption("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8800"), systemProperty("osgi.console").value("2323"), systemProperty("osgi.console.enable.builtin").value("true"), vmOption("-Xmx1024M"), frameworkProperty("osgi.console.enable.builtin").value("true"), frameworkProperty("osgi.console").value("2324"), These are the VM options as reported by JConsole: -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8800 -Xmx1024M -Dpax.swissbox.framework.rmi.port=21000 -Dosgi.console=2323 -Dpax.exam.invoker=junit -Dpax.exam.service.timeout=1 -Dosgi.console.enable.builtin=true -Djava.protocol.handler.pkgs=org.ops4j.pax.url -Dorg.ops4j.pax.logging.DefaultServiceLog.level=INFO -Dpax.swissbox.framework.rmi.name=ExamRemoteFramework-413ded52-a922-4825-bb6b-cce68fea01fe With this classpath: /Users/erwin/.m2/repository/org/eclipse/birt/runtime/org.eclipse.osgi/3.10.2.v20150203-1939/org.eclipse.osgi-3.10.2.v20150203-1939.jar:/Users/erwin/.m2/repository/org/ops4j/pax/swissbox/pax-swissbox-framework/1.8.2/pax-swissbox-framework-1.8.2.jar:/Users/erwin/.m2/repository/org/ops4j/pax/swissbox/pax-swissbox-tracker/1.8.2/pax-swissbox-tracker-1.8.2.jar Thanks for your time. Erwin -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.