[Javassist] - VerifyError with complex Javassist instrumentation
by Matt Benson
Matt Benson [https://community.jboss.org/people/mbenson] created the discussion
"VerifyError with complex Javassist instrumentation"
To view the discussion, visit: https://community.jboss.org/message/805734#805734
--------------------------------------------------------------
Hi, I'm working on a new OSS project to allow Java developers to declaratively handle the Java AccessController APIs. One of our features is the concept of "method blueprinting" whereby the code requiring privileges is housed in a security-agnostic static implementation method. Calls to such methods are translated to calls to local, cloned methods. This basic concept is all working great with Javassist. The problem occurs when such a "blueprint method" references a field. I have created code to handle field accesses using reflection (as opposed to copying the field, which might then not be initialized, etc.). I am by no means a bytecode expert, but I am familiar with recursive-descent parsers and I have stepped through the code that compiles my replacement statements; this all looks fine. I have compared the bytecode Javassist is generating with the bytecode generated by javac to do the same type of field reflection and I (from my inexpert POV) cannot see anything that appears significant. When I try to run my instrumented code I get VerifyError "Incompatible argument to function". I am at a complete loss. I would be highly appreciative if any experts were able to offer further advice on how to proceed. If anyone is interested, the current code can be viewed at http://svn.apache.org/repos/asf/commons/sandbox/weaver/branches/fields http://svn.apache.org/repos/asf/commons/sandbox/weaver/branches/fields . Probably the easiest way to test is `mvn -DskipTests clean install` then `cd example; mvn test` to see the problem.
TIA,
Matt
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/805734#805734]
Start a new discussion in Javassist at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[Datasource Configuration] - IJ000453: Unable to get managed connection for java:jboss/datasources/<DataSource>
by Sam C
Sam C [https://community.jboss.org/people/darkcloudi] created the discussion
"IJ000453: Unable to get managed connection for java:jboss/datasources/<DataSource>"
To view the discussion, visit: https://community.jboss.org/message/805286#805286
--------------------------------------------------------------
I am trying to setup JBOSS connection to postgres, connection details below, but get an error where it is failing to connect. Any ideas what needs to be done? i am new to JBoss and Postgres. I got data in my STOCK schema but cannot figure out why it cannot make a connection when I go to the webpage localhost:8080/example
This is a very simple app and does nothing exciting other then authenticate.
web.xml contains the following with some other stuff but this is the authentication
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Stock</realm-name>
</login-config>
Stock-ds.xml (Found in deployments directory)
<?xml version="1.0" encoding="UTF-8"?>
<datasources xmlns=" http://www.jboss.org/ironjacamar/schema http://www.jboss.org/ironjacamar/schema">
<datasource jndi-name="java:jboss/datasources/StockDatasource" enabled="true"
use-java-context="true" pool-name="StockDatasource">
<connection-url>jdbc:postgresql://localhost:5432/postgres</connection-url>
<driver>postgresql-8.4-703.jdbc4.jar</driver>
<pool></pool>
<security>
<user-name>postgres</user-name>
<password>password</password>
</security>
</datasource>
</datasources>
standalone.xml
| | <security-domain name="Stock" cache-type="default"> |
| | <authentication> |
| | <login-module code="Database" flag="required"> |
| | <module-option name="dsJndiName" value="java:jboss/datasources/StockDatasource"/> |
| | <module-option name="principalsQuery" value="select password from STOCK.USER where username=?"/> |
| | <module-option name="rolesQuery" value="select rolename, 'Roles' from STOCK.ROLE r, STOCK.USER u where u.userid=r.userid and u.username=?"/> |
| | </login-module> |
| | </authentication> |
| | </security-domain> |
The error i get is:
*Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/StockDatasource*
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:390)
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:139)
... 29 more
Caused by: javax.resource.ResourceException: IJ000658: Unexpected throwable while trying to create a connection: null
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:371)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)
... 32 more
Caused by: javax.resource.ResourceException: Could not create connection
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:235)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343)
... 35 more
Caused by: org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "postgres"
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/805286#805286]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[JBoss Web Services] - Soap header truncated
by Daniel Cote
Daniel Cote [https://community.jboss.org/people/daniel.cote.qc.ca] created the discussion
"Soap header truncated"
To view the discussion, visit: https://community.jboss.org/message/804261#804261
--------------------------------------------------------------
Hi,
I'm using Jboss 7.1.1final + ...
In a WebService, I configured a SoapHandler that is use to extract information from the incoming transaction.
Altough it worked fine for usual use cases, it broked when I tried to extract soap header content that was bigger (more than 512 bytes).
Here the extracts from the trace file:
Note the followings:
* the payload received (logged) demonstrates that the transaction is well received, including the complete content of the wsse:Security header (payload is here irrelevant, just a serie of 0123456789...)
* the 07:27:34,792 CONF (http-localhost-127.0.0.1-8080-1) com.ibm.ihii.xua.AbstractSAMLValidator.<init> Constructor
shows that the content, that has been extracted, is truncated ..
* In debug, I can see that when processing the header, the content that is made available matches the truncated value... The problem is is the handler...
* Here an extract from the extraction code used by the handler:
static private void extractSoapHeader(SOAPMessageContext soapCtx, CallContext callContext)
{
SOAPMessage message = soapCtx.getMessage();
SOAPHeader header;
try {
header = message.getSOAPPart().getEnvelope().getHeader();
} catch (SOAPException e) {
throw new RuntimeException(e);
}
Iterator<SOAPHeaderElement> it;
if (header != null) {
it = header.examineAllHeaderElements();
while (it.hasNext()) {
SOAPHeaderElement element = it.next();
String elementName = element.getLocalName();
Node n = element.getFirstChild();
String value = n.getTextContent();
The 'value' variable matches the truncated value...
The SOAPHeader implementation is com.sun.xml.messaging.saaj.soap.ver1_2.Header1_2Impl during the execution.
This code works perfectly in other Appserver...
Any idea??
Thanks
07:27:34,573 INFO (http-localhost-127.0.0.1-8080-1) com.ibm.ai.xds.webContext.XDSHandler.Msg from: [ 127.0.0.1] target --> http://localhost:8080/XDSRegistryWS/DocumentRegistry_Service action:[urn:ihe:iti:2007:RegistryStoredQuery]
07:27:34,573 CONF (http-localhost-127.0.0.1-8080-1) com.ibm.ai.xds.webContext.XDSHandler.logMessage message received... payload:[<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext..."><Assertion>
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
<Assertion>
</wsse:Security><wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing" soap:mustUnderstand="1">urn:ihe:iti:2007:RegistryStoredQuery</wsa:Action><wsa:ReplyTo xmlns:wsa="http://www.w3.org/2005/08/addressing" soap:mustUnderstand="1"><wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address></wsa:ReplyTo><wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8080/XDSRegistryWS/DocumentRegistry_Service</wsa:To><wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">7dd20f4c-c1f7-45cb-befc-c77b257d9df6</wsa:MessageID></soap:Header><soap:Body><ns5:AdhocQueryRequest xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:ns4="urn:ihe:iti:xds-b:2007" xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"><ns5:ResponseOption returnComposedObjects="true" returnType="LeafClass"/><AdhocQuery id="urn:uuid:14d4debf-8f97-4251-9a74-a90016b0af0d"><Slot name="$XDSDocumentEntryPatientId"><ValueList><Value>NA5156^^^&1.3.6.1.4.1.21367.2010.1.2.300&ISO</Value></ValueList></Slot><Slot name="$XDSDocumentEntryStatus"><ValueList><Value>urn:oasis:names:tc:ebxml-regrep:StatusType:Approved</Value></ValueList></Slot></AdhocQuery></ns5:AdhocQueryRequest></soap:Body></soap:Envelope>]
07:27:34,604 WARN (http-localhost-127.0.0.1-8080-1) com.ai.utils.BaseParms.getInstance Instance [OrchestrationConfig.xml] has been updated... Launching refresh
07:27:34,620 INFO (http-localhost-127.0.0.1-8080-1) com.ibm.ai.xds.registry.webservices.DocumentRegistryImpl.constructor !
07:27:34,620 INFO (http-localhost-127.0.0.1-8080-1) com.ibm.ai.xds.registry.webservices.DocumentRegistryImpl.constructor !
07:27:34,620 INFO (http-localhost-127.0.0.1-8080-1) com.ibm.ai.xds.registry.submission.validation.ReferenceDataModel.constructor
07:27:34,792 CONF (http-localhost-127.0.0.1-8080-1) com.ibm.ihii.xua.AbstractSAMLValidator.<init> Constructor
<Assertion>
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789
07:27:34,807 ERRO (http-localhost-127.0.0.1-8080-1) stderr.write [Fatal Error] :6:80: XML document structures must start and end within the same entity.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/804261#804261]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[jBPM] - Intellipaat provides Drools & JBPM online training
by Soma gupta
Soma gupta [https://community.jboss.org/people/somaintellipaat] created the discussion
"Intellipaat provides Drools & JBPM online training"
To view the discussion, visit: https://community.jboss.org/message/805652#805652
--------------------------------------------------------------
*Intellipaat provides Drools & JBPM online training*
Hi,
We will start Drools & JBPM online training from 5^th^ April’13. Training will be 70-80 % hands on.
Our institute is the market leader in providing online training at the lowest price with high quality from the last 4 yrs. Training is carried out on Webex or goto meeting where the trainer trains the candidates and answers their queries.
The trainer has 16+ yrs of experience and has conducted multiple online trainings.
JBPM and Drools training to get ahead middleware architects and application developers who are responsible for designing business processes, implementing business process management systems, and integrating BPM into their enterprise architecture with Business Rule Management System. The course teaches process modeling, task management, client APIs, integration and customization, etc.
Interested candidates please drop an email for registration at mailto:sales@intellipaat.com sales(a)intellipaat.com or give us a call.
Grab your seats now!
Regards,
Sales Intellipaat Team
Mob: 91-9019368913
Visit us at http://www.intellipaat.com/ www.intellipaat.com.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/805652#805652]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years