visshal patel

Greenhorn
+ Follow
since Apr 01, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by visshal patel

We have developed an application for our client, which is running on WAS 5.1. It runs fine for some time with several users. We are using SQL Server database 2000 and connect using MS SQL Driver (non-XA) with database pool manager connection(Max/Min 10/1). After some time, though it is showing "Total number of connections = 1" (that means server can create 9 more connections still), it is throwing J2CA0046E:Resource Allocation Exception. Some of the Trace(J2C) log is as follows. Any help will be greatly appreciated.

Connection Request Information = com.ibm.ws.rsadapter.spi.WSConnectionRequestInfoImpl@4
UserName = null
Password = null
Catalog = null
IsReadOnly = null
TypeMap = null
Isolation = REPEATABLE READ
Support isolation switching = false
Handle type = java.sql.Connection
[6/15/06 14:59:42:820 EDT] 24fa970e PoolManager d reserve(), Pool contents ==> PoolManager name:jdbc/qualitystage
PoolManager object:1308923669
Total number of connections: 1 (max/min 10/1)
Pool Bucket configuration
Shared Buckets: 200
UnShared Buckets: 10
Shared Connection information
(133) com.ibm.ws.LocalTransaction.LocalTranCoordImpl@547c5735 MCWrapper id 4fc8d723 Managed connection com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@48f45723 State:STATE_TRAN_WRAPPER_INUSE
Total number of connection in shared pool: 1
Free Connection information

No free connections

UnShared Connection information
No unshared connections

[6/15/06 14:59:42:820 EDT] 24fa970e SharedPool > getSharedConnection
[6/15/06 14:59:42:820 EDT] 24fa970e SharedPool d allocateConnection_Common: HandleCount = 1
[6/15/06 14:59:42:820 EDT] 24fa970e SharedPool I J2CA0086W: Shareable connection MCWrapper id 4fc8d723 Managed connection com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@48f45723 State:STATE_TRAN_WRAPPER_INUSE
from resource jdbc/qualitystage was used within a local transaction containment boundary.
[6/15/06 14:59:42:820 EDT] 24fa970e SharedPool < getSharedConnection, returning mcWrapper <br /> <null><br /> [6/15/06 14:59:42:820 EDT] 24fa970e PoolManager > computeHashCode
[6/15/06 14:59:42:820 EDT] 24fa970e PoolManager < computeHashCode, hashCode is 2<br /> [6/15/06 14:59:42:820 EDT] 24fa970e FreePool > createOrWaitForConnection
[6/15/06 14:59:42:820 EDT] 24fa970e FreePool d TotalConnectionCount is 2
[6/15/06 14:59:42:820 EDT] 24fa970e FreePool > createManagedConnectionWithMCWrapper

[6/15/06 14:59:43:242 EDT] 24fa970e FreePool E J2CA0046E: Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/qualitystage, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: DSRA8100E: Unable to get a PooledConnection from the DataSource.
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:244)
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:171)
at com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:208)
at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:706)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:487)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:577)
at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1280)
at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:1064)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1571)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:622)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:424)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:216)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:191)
at com.itt.util.SqlConnectionDAO.getConnection(SqlConnectionDAO.java:43)
at com.itt.util.DropDownDAO.<init>(DropDownDAO.java:33)
at com.itt.action.InquirybyGeneralDataAction.inquirybyGeneralDataView(InquirybyGeneralDataAction.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
at org.apache.struts.actions.MappingDispatchAction.execute(MappingDispatchAction.java:169)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error opening/loading com.microsoft.util.transliteration.properties.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.setNonUnicodeTransliterator(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.setSQLCollation(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processEnvChange(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSLoginRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbcx.base.BaseDataSource.getBaseConnection(Unknown Source)
at com.microsoft.jdbcx.base.BaseDataSource.getPooledConnection(Unknown Source)
at com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:688)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:683)
... 44 more
17 years ago
I am using WSAD 5.1.1 integration edition. When I use WSDL(right click) -> web services -> generate client funtion, it only generates files as follows.

- smtpmail_service.java (interface)
- smtpmail_servicelocator.java
- smtpmail_servicesoap.java (interface)
- smtpmail_servicesoapproxy.java
- smtpmail_servicesoapstub.java

I think some more files, other than these files, should be generated. So that I can use those files to use in my client program. Let me know if anybody has any suggestions. My WSDL file is as follows.


<?xml version="1.0" encoding="UTF-8"?>
<wsdl efinitions targetNamespace="http://tempuri.org/SSSMTPMail/SMTPMAIL_service" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:tns="http://tempuri.org/SSSMTPMail/SMTPMAIL_service" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/SSSMTPMail/SMTPMAIL_service" xmlns:s="http://www.w3.org/2001/XMLSchema">
<s:element name="SendMail">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="smessage" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="ssubject" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="stoaddress" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="sfromaddress" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="sccaddress" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="sformat" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="SendMailResponse">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="SendMailResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="SendMailSoapIn">
<wsdl :p art name="parameters" element="tns:SendMail"/>
</wsdl:message>
<wsdl:message name="SendMailSoapOut">
<wsdl :p art name="parameters" element="tns:SendMailResponse"/>
</wsdl:message>
<wsdl :p ortType name="SMTPMAIL_serviceSoap">
<wsdl peration name="SendMail">
<wsdl:input message="tns:SendMailSoapIn"/>
<wsdl utput message="tns:SendMailSoapOut"/>
</wsdl peration>
</wsdl :p ortType>
<wsdl:binding name="SMTPMAIL_serviceSoap" type="tns:SMTPMAIL_serviceSoap">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl peration name="SendMail">
<soap peration soapAction="http://tempuri.org/SSSMTPMail/SMTPMAIL_service/SendMail" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl utput>
<soap:body use="literal"/>
</wsdl utput>
</wsdl peration>
</wsdl:binding>
<wsdl:service name="SMTPMAIL_service">
<wsdl :p ort name="SMTPMAIL_serviceSoap" binding="tns:SMTPMAIL_serviceSoap">
<soap:address location="http://localhost:9080/ITTPortal/services/SMTPMAIL_serviceSoap"/>
</wsdl :p ort>
</wsdl:service>
</wsdl efinitions>
[ May 02, 2006: Message edited by: visshal patel ]
17 years ago
I am using WASD 5.1.1 integration edition. When I use WSDL(right click) -> web services -> generate client funtion, it only generates files as follows.

- smtpmail_service.java (interface)
- smtpmail_servicelocator.java
- smtpmail_servicesoap.java (interface)
- smtpmail_servicesoapproxy.java
- smtpmail_servicesoapstub.java

I think some more files, other than these files, should be generated. So that I can use those files to use in my client program. Let me know if anybody has any suggestions. My WSDL file is as follows.


<?xml version="1.0" encoding="UTF-8"?>
<wsdl efinitions targetNamespace="http://tempuri.org/SSSMTPMail/SMTPMAIL_service" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:tns="http://tempuri.org/SSSMTPMail/SMTPMAIL_service" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">

<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/SSSMTPMail/SMTPMAIL_service" xmlns:s="http://www.w3.org/2001/XMLSchema">

<s:element name="SendMail">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="smessage" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="ssubject" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="stoaddress" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="sfromaddress" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="sccaddress" type="s:string"/>
<s:element maxOccurs="1" minOccurs="0" name="sformat" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="SendMailResponse">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="SendMailResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="SendMailSoapIn">
<wsdl art name="parameters" element="tns:SendMail"/>
</wsdl:message>
<wsdl:message name="SendMailSoapOut">
<wsdl art name="parameters" element="tns:SendMailResponse"/>
</wsdl:message>
<wsdl ortType name="SMTPMAIL_serviceSoap">
<wsdl peration name="SendMail">
<wsdl:input message="tns:SendMailSoapIn"/>
<wsdl utput message="tns:SendMailSoapOut"/>
</wsdl peration>
</wsdl ortType>
<wsdl:binding name="SMTPMAIL_serviceSoap" type="tns:SMTPMAIL_serviceSoap">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl peration name="SendMail">
<soap peration soapAction="http://tempuri.org/SSSMTPMail/SMTPMAIL_service/SendMail" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl utput>
<soap:body use="literal"/>
</wsdl utput>
</wsdl peration>
</wsdl:binding>
<wsdl:service name="SMTPMAIL_service">
<wsdl ort name="SMTPMAIL_serviceSoap" binding="tns:SMTPMAIL_serviceSoap">
<soap:address location="http://localhost:9080/ITTPortal/services/SMTPMAIL_serviceSoap"/>
</wsdl ort>
</wsdl:service>
</wsdl efinitions>
[ May 02, 2006: Message edited by: visshal patel ]
17 years ago
Hi,

I have a question related to version based compilation for jar files.

I have a jar file called jtools.jar for our application. I want to include all the versions of jtools.jar e.g. jtools_v_2_1.jar, jtools_v_2_2.jar, jtools_v_4_1.jar� into one single server. To make this possible, I need a class path that also includes the version number. For example, instead of having classes:


com.fisci.activity.adaptors.DoubleAdaptor.java

com.fisci.activity.adaptors.DateAdaptor.java



we want to have classes for version v_2_1:



com.fisci.v_2_1.activity.adaptors.DoubleAdaptor.java

com.fisci.v_2_1.activity.adaptors.DateAdaptor.java



and in a separate java structure for version v_2_2, we want to have classes:



com.fisci.v_2_2.activity.adaptors.DoubleAdaptor.java

com.fisci.v_2_2.activity.adaptors.DateAdaptor.java



and yet in another separate java structure for version v_4_1, we want to have classes:



com.fisci.v_4_1.activity.adaptors.DoubleAdaptor.java

com.fisci.v_4_1.activity.adaptors.DateAdaptor.java



The directory structure is simple:

com/fisci/v_2_1/adaptors/�

com/fisci/v_2_2/adaptors/�

com/fisci/v_4_1/adaptors/�



The question: is there a way in Java language that we can �version� the �import� statements? Example:



Instead of

import java.util.*;

import com.fisci.activity.adaptors.*;





we envision to have it in the form of:

import java.util.*;

import com.fisci.%version%.activity.adaptors.*;



Is there a �macro� in the form above (%version%) that we can it be replaced during compilation with let�s say v_2_2? (and compiler could take the �D symbolic definition what indicates version of interest is let�s say v_2_2)?

I will appreciate any suggestions...

Regards,
Vishal
19 years ago
hi all,
I am getting following error while deploying entity bean in jboss3.0/3.2. Here is the stack trace. I have included ejb-jar.xml and jbosscmp-jdbc.xml after stack trace.
*********************************************
2004-04-07 15:14:01,806 WARN [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:jndiName=SavingAccount,service=EJB
org.jboss.util.NestedRuntimeException: Failed to create new proxy target; - nested throwable: (java.lang.reflect.InvocationTargetException)
at org.jboss.proxy.compiler.Proxy.newProxyInstance(Proxy.java:52)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateBeanClassInstanceCommand.<init>(JDBCCreateBeanClassInstanceCommand.java:62)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateBeanClassInstanceCommand(JDBCCommandFactory.java:123)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:463)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:388)
at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:152)
at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:342)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
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:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
at $Proxy14.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:394)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy90.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
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:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
at $Proxy14.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:394)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy12.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.jboss.proxy.compiler.Proxies$Impl.newTarget(Proxies.java:613)
at org.jboss.proxy.compiler.Proxies.newTarget(Proxies.java:78)
at org.jboss.proxy.compiler.Proxy.newProxyInstance(Proxy.java:49)
... 57 more
Caused by: java.lang.NullPointerException
at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
at com.vigorsoft.ebank.ejbs.SavingBean$Proxy.getAccountNumber(<generated>
at com.vigorsoft.ebank.ejbs.SavingBean.<init>(Unknown Source)
at com.vigorsoft.ebank.ejbs.SavingBean$Proxy.<init>(<generated>
... 64 more
2004-04-07 15:14:02,417 INFO [org.jboss.ejb.EjbModule] Started jboss.j2ee:module=bank.jar,service=EjbModule,uid=23938775
2004-04-07 15:14:02,427 INFO [org.jboss.ejb.EJBDeployer] Deployed: file:/C:/jboss-3.2.3/server/default/deploy/bank.jar
2004-04-07 15:14:02,477 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/jboss-3.2.3/server/default/deploy/bank.jar
2004-04-07 15:14:02,497 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
<none>
Incompletely deployed packages:
<none>
MBeans waiting for classes:
<none>
MBeans waiting for other MBeans:
[ObjectName: jboss.mq:service=InvocationLayer,type=HTTP
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
jboss.web:service=WebServer
Depends On Me: , ObjectName: jboss.mq:service=DestinationManager
state: CONFIGURED
I Depend On: jboss.mq:service=MessageCache
jboss.mq:service=PersistenceManager
jboss.mq:service=StateManager
Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
jboss.mq.destination:service=Topic,name=securedTopic
jboss.mq.destination:service=Topic,name=testDurableTopic
jboss.mq.destination:service=Queue,name=testQueue
jboss.mq.destination:service=Queue,name=A
jboss.mq.destination:service=Queue,name=B
jboss.mq.destination:service=Queue,name=C
jboss.mq.destination:service=Queue,name=D
jboss.mq.destination:service=Queue,name=ex
jboss.mq:service=SecurityManager
jboss.mq.destination:service=Queue,name=DLQ
, ObjectName: jboss.mq:service=PersistenceManager
state: CONFIGURED
I Depend On: jboss.jca:service=LocalTxCM,name=DefaultDS
Depends On Me: jboss.mq:service=DestinationManager
, ObjectName: jboss.mq.destination:service=Topic,name=testTopic
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=securedTopic
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=testDurableTopic
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=testQueue
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=A
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=B
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=C
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=D
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=ex
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq:service=Invoker
state: CONFIGURED
I Depend On: jboss.mq:service=TracingInterceptor
Depends On Me: jboss.mq:service=InvocationLayer,type=HTTP
jboss.mq:service=InvocationLayer,type=JVM
jboss.mq:service=InvocationLayer,type=OIL
jboss.mq:service=InvocationLayer,type=OIL2
jboss.mq:service=InvocationLayer,type=RMI
jboss.mq:service=InvocationLayer,type=UIL2
, ObjectName: jboss.mq:service=TracingInterceptor
state: CONFIGURED
I Depend On: jboss.mq:service=SecurityManager
Depends On Me: jboss.mq:service=Invoker
, ObjectName: jboss.mq:service=SecurityManager
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
jboss.mq.destination:service=Topic,name=securedTopic
jboss.mq.destination:service=Topic,name=testDurableTopic
jboss.mq.destination:service=Queue,name=testQueue
jboss.mq:service=TracingInterceptor
jboss.mq.destination:service=Queue,name=DLQ
, ObjectName: jboss.mq.destination:service=Queue,name=DLQ
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=JVM
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=OIL
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=OIL2
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=RMI
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.j2ee:jndiName=Saving,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.util.NestedRuntimeException: Failed to create new proxy target; - nested throwable: (java.lang.reflect.InvocationTargetException), ObjectName: jboss.j2ee:jndiName=SavingAccount,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.util.NestedRuntimeException: Failed to create new proxy target; - nested throwable: (java.lang.reflect.InvocationTargetException)]
***********************************************8
ejb-jar.xml
*********************************************
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd">
<ejb-jar>
<description>Bank Bean</description>
<display-name>Bank</display-name>

<enterprise-beans>
<entity>
<description>Saving Account</description>
<ejb-name>SavingAccount</ejb-name>
<home>com.vigorsoft.ebank.ejbs.SavingHome</home>
<remote>com.vigorsoft.ebank.ejbs.Saving</remote>
<ejb-class>com.vigorsoft.ebank.ejbs.SavingBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>com.vigorsoft.ebank.ejbs.SavingPK</prim-key-class>
<reentrant>False</reentrant>

<cmp-version>2.x</cmp-version>
<abstract-schema-name>vpsaving</abstract-schema-name>
<cmp-field><field-name>accountNumber</field-name></cmp-field>
<cmp-field><field-name>customerName</field-name></cmp-field>
<cmp-field><field-name>balance</field-name></cmp-field>
</entity>
</enterprise-beans>
</ejb-jar>

*********************************************8
jbosscmp-jdbc.xml
************************************************
<jbosscmp-jdbc>
<defaults>
<datasource>java:/PostgresDS</datasource>
<datasource-mapping>PostgreSQL</datasource-mapping>
</defaults>
<enterprise-beans>
<entity>
<ejb-name>SavingAccount</ejb-name>
<table-name>vp_saving</table-name>
<create-table>true</create-table>

<cmp-field>
<field-name>accountNumber</field-name>
<column-name>account_number</column-name>
</cmp-field>

<cmp-field>
<field-name>customerName</field-name>
<column-name>customer_name</column-name>
</cmp-field>

<cmp-field>
<field-name>balance</field-name>
<column-name>balance</column-name>
</cmp-field>

</entity>

</enterprise-beans>

</jbosscmp-jdbc>
*********************************************
Let me know, if anybody has knowledge about this problem.
Thanks in advance...
-Vishal
hi all,
I am getting following error while deploying entity bean in jboss3.0/3.2. Here is the stack trace. I have included ejb-jar.xml and jbosscmp-jdbc.xml after stack trace.
*********************************************
2004-04-07 15:14:01,806 WARN [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:jndiName=SavingAccount,service=EJB
org.jboss.util.NestedRuntimeException: Failed to create new proxy target; - nested throwable: (java.lang.reflect.InvocationTargetException)
at org.jboss.proxy.compiler.Proxy.newProxyInstance(Proxy.java:52)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateBeanClassInstanceCommand.<init>(JDBCCreateBeanClassInstanceCommand.java:62)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateBeanClassInstanceCommand(JDBCCommandFactory.java:123)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:463)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:388)
at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:152)
at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:342)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
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:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
at $Proxy14.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:394)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy90.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
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:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
at $Proxy14.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:394)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy12.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.jboss.proxy.compiler.Proxies$Impl.newTarget(Proxies.java:613)
at org.jboss.proxy.compiler.Proxies.newTarget(Proxies.java:78)
at org.jboss.proxy.compiler.Proxy.newProxyInstance(Proxy.java:49)
... 57 more
Caused by: java.lang.NullPointerException
at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
at com.vigorsoft.ebank.ejbs.SavingBean$Proxy.getAccountNumber(<generated>
at com.vigorsoft.ebank.ejbs.SavingBean.<init>(Unknown Source)
at com.vigorsoft.ebank.ejbs.SavingBean$Proxy.<init>(<generated>
... 64 more
2004-04-07 15:14:02,417 INFO [org.jboss.ejb.EjbModule] Started jboss.j2ee:module=bank.jar,service=EjbModule,uid=23938775
2004-04-07 15:14:02,427 INFO [org.jboss.ejb.EJBDeployer] Deployed: file:/C:/jboss-3.2.3/server/default/deploy/bank.jar
2004-04-07 15:14:02,477 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/jboss-3.2.3/server/default/deploy/bank.jar
2004-04-07 15:14:02,497 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
<none>
Incompletely deployed packages:
<none>
MBeans waiting for classes:
<none>
MBeans waiting for other MBeans:
[ObjectName: jboss.mq:service=InvocationLayer,type=HTTP
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
jboss.web:service=WebServer
Depends On Me: , ObjectName: jboss.mq:service=DestinationManager
state: CONFIGURED
I Depend On: jboss.mq:service=MessageCache
jboss.mq:service=PersistenceManager
jboss.mq:service=StateManager
Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
jboss.mq.destination:service=Topic,name=securedTopic
jboss.mq.destination:service=Topic,name=testDurableTopic
jboss.mq.destination:service=Queue,name=testQueue
jboss.mq.destination:service=Queue,name=A
jboss.mq.destination:service=Queue,name=B
jboss.mq.destination:service=Queue,name=C
jboss.mq.destination:service=Queue,name=D
jboss.mq.destination:service=Queue,name=ex
jboss.mq:service=SecurityManager
jboss.mq.destination:service=Queue,name=DLQ
, ObjectName: jboss.mq:service=PersistenceManager
state: CONFIGURED
I Depend On: jboss.jca:service=LocalTxCM,name=DefaultDS
Depends On Me: jboss.mq:service=DestinationManager
, ObjectName: jboss.mq.destination:service=Topic,name=testTopic
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=securedTopic
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=testDurableTopic
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=testQueue
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=A
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=B
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=C
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=D
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=ex
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: , ObjectName: jboss.mq:service=Invoker
state: CONFIGURED
I Depend On: jboss.mq:service=TracingInterceptor
Depends On Me: jboss.mq:service=InvocationLayer,type=HTTP
jboss.mq:service=InvocationLayer,type=JVM
jboss.mq:service=InvocationLayer,type=OIL
jboss.mq:service=InvocationLayer,type=OIL2
jboss.mq:service=InvocationLayer,type=RMI
jboss.mq:service=InvocationLayer,type=UIL2
, ObjectName: jboss.mq:service=TracingInterceptor
state: CONFIGURED
I Depend On: jboss.mq:service=SecurityManager
Depends On Me: jboss.mq:service=Invoker
, ObjectName: jboss.mq:service=SecurityManager
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
jboss.mq.destination:service=Topic,name=securedTopic
jboss.mq.destination:service=Topic,name=testDurableTopic
jboss.mq.destination:service=Queue,name=testQueue
jboss.mq:service=TracingInterceptor
jboss.mq.destination:service=Queue,name=DLQ
, ObjectName: jboss.mq.destination:service=Queue,name=DLQ
state: CONFIGURED
I Depend On: jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=JVM
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=OIL
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=OIL2
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=RMI
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
state: CONFIGURED
I Depend On: jboss.mq:service=Invoker
Depends On Me: , ObjectName: jboss.j2ee:jndiName=Saving,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.util.NestedRuntimeException: Failed to create new proxy target; - nested throwable: (java.lang.reflect.InvocationTargetException), ObjectName: jboss.j2ee:jndiName=SavingAccount,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.util.NestedRuntimeException: Failed to create new proxy target; - nested throwable: (java.lang.reflect.InvocationTargetException)]
***********************************************8
ejb-jar.xml
*********************************************
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd">
<ejb-jar>
<description>Bank Bean</description>
<display-name>Bank</display-name>

<enterprise-beans>
<entity>
<description>Saving Account</description>
<ejb-name>SavingAccount</ejb-name>
<home>com.vigorsoft.ebank.ejbs.SavingHome</home>
<remote>com.vigorsoft.ebank.ejbs.Saving</remote>
<ejb-class>com.vigorsoft.ebank.ejbs.SavingBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>com.vigorsoft.ebank.ejbs.SavingPK</prim-key-class>
<reentrant>False</reentrant>

<cmp-version>2.x</cmp-version>
<abstract-schema-name>vpsaving</abstract-schema-name>
<cmp-field><field-name>accountNumber</field-name></cmp-field>
<cmp-field><field-name>customerName</field-name></cmp-field>
<cmp-field><field-name>balance</field-name></cmp-field>
</entity>
</enterprise-beans>
</ejb-jar>

*********************************************8
jbosscmp-jdbc.xml
************************************************
<jbosscmp-jdbc>
<defaults>
<datasource>java:/PostgresDS</datasource>
<datasource-mapping>PostgreSQL</datasource-mapping>
</defaults>
<enterprise-beans>
<entity>
<ejb-name>SavingAccount</ejb-name>
<table-name>vp_saving</table-name>
<create-table>true</create-table>

<cmp-field>
<field-name>accountNumber</field-name>
<column-name>account_number</column-name>
</cmp-field>

<cmp-field>
<field-name>customerName</field-name>
<column-name>customer_name</column-name>
</cmp-field>

<cmp-field>
<field-name>balance</field-name>
<column-name>balance</column-name>
</cmp-field>

</entity>

</enterprise-beans>

</jbosscmp-jdbc>
*********************************************
Let me know, if anybody has knowledge about this problem.
Thanks in advance...
-Vishal
19 years ago
Hi Ade,
Sorry about the mistake. Here is the code.
A point of note:- THIS SAME SET OF CODE WHEN DEPLOYED ON JBOSS-3.0.4 IT WORKS WITHOUT ANY PROBLEMS. I WONDER WHY IT WON'T WORK on Jboss-3.2.x
I also tried the Ship-Cabin Example from OReilly and even that won't work on Jboss-3.2.x for the same error situation.

/*
* BookHome.java
*
* Created on Mar 31, 2004 12:07:18 PM
*
* (C) Copyright VigorSoft Private Ltd, Baroda, India.
* All rights reserved
* The copyright to the computer program(s) herein is the property of
* VigorSoft Private Ltd, Baroda,India.The program(s) may be used and/or
* copied only with the written permission of VigorSoft Private Ltd,
* Baroda,India or in accordance with the terms and conditions stipulated
* in the agreement/contract under which the program(s) have been supplied.
************************************************************************
***********************Modification History*****************************
*Date Initials Change-Id Comments
************************************************************************
*
************************************************************************
*/
package com.vigorsoft.ejb;
import javax.ejb.EJBHome;
import javax.ejb.CreateException;
import javax.ejb.FinderException;
import java.rmi.RemoteException;
import java.util.Collection;
/**
* @author vishalp
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public interface BookHome extends EJBHome {
/* Create a new instance of Book */
public Book create(int newId, String newTitle,
String newAuthor, String newPublisher,
double newUsDollarPrice)
throws RemoteException, CreateException;
/* Find a Book with the specified ID. The EJB container
implements this method for us automatically. */
public Book findByPrimaryKey (BookPK book)
throws RemoteException, FinderException;
/* Return a Collection of books that matches an author name. This
method is implemented automatically by the EJB container. */
public Collection findByAuthor (String authorName)
throws RemoteException, FinderException;
/* Return all of the Book objects in the database */
public Collection findAll() throws RemoteException, FinderException;

public Collection findExpensiveBooks(double dollar)
throws RemoteException, FinderException;
}
I am trying to deploy a simple CMP-entity bean on jboss3.2. On one of the EJBQL in ejb-jar.xml it gives "nosuchmethodexception". My files are as follows.
********************************************
ejb-jar.xml
*****************************************
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd">
<ejb-jar>
<description>ATF Book Bean</description>
<display-name>ATF Book</display-name>
<enterprise-beans>
<entity>
<description>Models a book</description>
<ejb-name>Book</ejb-name>
<home>com.vigorsoft.ejb.BookHome</home>
<remote>com.vigorsoft.ejb.Book</remote>
<ejb-class>com.vigorsoft.ejb.BookBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>com.vigorsoft.ejb.BookPK</prim-key-class>
<reentrant>False</reentrant>

<cmp-version>2.x</cmp-version>
<abstract-schema-name>BookBean</abstract-schema-name>
<cmp-field><field-name>id</field-name></cmp-field>
<cmp-field><field-name>author</field-name></cmp-field>
<cmp-field><field-name>title</field-name></cmp-field>
<cmp-field><field-name>publisher</field-name></cmp-field>
<cmp-field><field-name>usDollarPrice</field-name></cmp-field>

<query>
<query-method>
<method-name>findExpensiveBooks</method-name>
<method-params>
<method-param>double</method-param>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(b) from BookBean AS b WHERE b.usDollarPrice > ?1]]>
</ejb-ql>
</query>
<query>
<query-method>
<method-name>findByAuthor</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(b) from BookBean AS b WHERE b.author = ?1]]>
</ejb-ql>
</query>
</entity>
</enterprise-beans>

<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>Book</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>

</ejb-jar>
***************************************************
jbosscmp-jdbc.xml
*****************************************************
<jbosscmp-jdbc>
<defaults>
<datasource>java:/PostgresDS</datasource>
<datasource-mapping>PostgreSQL</datasource-mapping>
</defaults>
<enterprise-beans>
<entity>
<ejb-name>Book</ejb-name>
<table-name>vp_book</table-name>
<create-table>true</create-table>

<cmp-field>
<field-name>id</field-name>
<column-name>id</column-name>
</cmp-field>

<cmp-field>
<field-name>author</field-name>
<column-name>author</column-name>
</cmp-field>

<cmp-field>
<field-name>title</field-name>
<column-name>title</column-name>
</cmp-field>

<cmp-field>
<field-name>publisher</field-name>
<column-name>publisher</column-name>
</cmp-field>

<cmp-field>
<field-name>usDollarPrice</field-name>
<column-name>usDollarPrice</column-name>
</cmp-field>
</entity>
</enterprise-beans>

</jbosscmp-jdbc>
************************************************************
Book.java
**********************************************************
package com.vigorsoft.ejb;
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
/**
* @author vishalp
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public interface Book extends EJBObject {

public int getId() throws RemoteException;
public void setId(int newId) throws RemoteException;
public String getTitle() throws RemoteException;
public void setTitle(String newTitle) throws RemoteException;
public String getAuthor() throws RemoteException;
public void setAuthor(String newAuthor) throws RemoteException;
public String getPublisher() throws RemoteException;
public void setPublisher(String newPublisher) throws RemoteException;
public double getUsDollarPrice() throws RemoteException;
public void setUsDollarPrice(double newDollarPrice) throws RemoteException;
}
******************************************************
BookBean.java
********************************************************
package com.vigorsoft.ejb;
import java.rmi.RemoteException;
import javax.ejb.EJBException;
import javax.ejb.CreateException;
import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import javax.ejb.RemoveException;
/**
* @author vishalp
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public abstract class BookBean implements EntityBean {
EntityContext ctx;
public int id;
public String title;
public String author;
public String publisher;
public double usDollarPrice;

/* (non-Javadoc)
* @see javax.ejb.EntityBean#ejbActivate()
*/
public void ejbActivate() throws EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.EntityBean#ejbLoad()
*/
public void ejbLoad() throws EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.EntityBean#ejbPassivate()
*/
public void ejbPassivate() throws EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.EntityBean#ejbRemove()
*/
public void ejbRemove()
throws RemoveException, EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.EntityBean#ejbStore()
*/
public void ejbStore() throws EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
*/
public void setEntityContext(EntityContext arg0)
throws EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() throws EJBException, RemoteException {
// TODO Auto-generated method stub
}


/* Each time create() is invoked on the home interface,
ejbCreate() is invoked on our object with the same
arguments. */
public BookPK ejbCreate(int newId, String newTitle,
String newAuthor, String newPublisher,
double newUsDollarPrice)
throws EJBException, RemoteException, CreateException {
// Assign our instance variables based on the arguments
/* id = newId;
title = newTitle;
author = newAuthor;
publisher = newPublisher;
usDollarPrice = newUsDollarPrice;
*/
setId(newId);
setTitle(newTitle);
setAuthor(newAuthor);
setPublisher(newPublisher);
setUsDollarPrice(newUsDollarPrice);
return new BookPK(id);
}
/* After ejbCreate() is invoked, the system executes
ejbPostCreate(), once again with the same arguments as create()
and ejbCreate(). Our bean is simple enough that it doesn't
need to do anything in ejbPostCreate(). */
public void ejbPostCreate(int newId, String title,
String author, String publisher,
double usDollarPrice) { }
/* We need to write one "setter" and one "getter" for each public
instance variable. */
public abstract int getId();
public abstract void setId(int newId);
public abstract String getTitle();
public abstract void setTitle(String newTitle);
public abstract String getAuthor();
public abstract void setAuthor(String newAuthor);
public abstract String getPublisher();
public abstract void setPublisher(String newPublisher);
public abstract double getUsDollarPrice();
public abstract void setUsDollarPrice(double newUsDollarPrice);
}
*****************************************8
BookHome.java
***********************************************
package com.vigorsoft.ejb;
import java.rmi.RemoteException;
import javax.ejb.EJBException;
import javax.ejb.CreateException;
import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import javax.ejb.RemoveException;
/**
* @author vishalp
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public abstract class BookBean implements EntityBean {
EntityContext ctx;
public int id;
public String title;
public String author;
public String publisher;
public double usDollarPrice;

/* (non-Javadoc)
* @see javax.ejb.EntityBean#ejbActivate()
*/
public void ejbActivate() throws EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.EntityBean#ejbLoad()
*/
public void ejbLoad() throws EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.EntityBean#ejbPassivate()
*/
public void ejbPassivate() throws EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.EntityBean#ejbRemove()
*/
public void ejbRemove()
throws RemoveException, EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.EntityBean#ejbStore()
*/
public void ejbStore() throws EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
*/
public void setEntityContext(EntityContext arg0)
throws EJBException, RemoteException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see javax.ejb.EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() throws EJBException, RemoteException {
// TODO Auto-generated method stub
}


/* Each time create() is invoked on the home interface,
ejbCreate() is invoked on our object with the same
arguments. */
public BookPK ejbCreate(int newId, String newTitle,
String newAuthor, String newPublisher,
double newUsDollarPrice)
throws EJBException, RemoteException, CreateException {
// Assign our instance variables based on the arguments
/* id = newId;
title = newTitle;
author = newAuthor;
publisher = newPublisher;
usDollarPrice = newUsDollarPrice;
*/
setId(newId);
setTitle(newTitle);
setAuthor(newAuthor);
setPublisher(newPublisher);
setUsDollarPrice(newUsDollarPrice);
return new BookPK(id);
}
/* After ejbCreate() is invoked, the system executes
ejbPostCreate(), once again with the same arguments as create()
and ejbCreate(). Our bean is simple enough that it doesn't
need to do anything in ejbPostCreate(). */
public void ejbPostCreate(int newId, String title,
String author, String publisher,
double usDollarPrice) { }
/* We need to write one "setter" and one "getter" for each public
instance variable. */
public abstract int getId();
public abstract void setId(int newId);
public abstract String getTitle();
public abstract void setTitle(String newTitle);
public abstract String getAuthor();
public abstract void setAuthor(String newAuthor);
public abstract String getPublisher();
public abstract void setPublisher(String newPublisher);
public abstract double getUsDollarPrice();
public abstract void setUsDollarPrice(double newUsDollarPrice);
}
**************************************************
BookPK.java
****************************************************
package com.vigorsoft.ejb;
import java.io.Serializable;
/**
* @author vishalp
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class BookPK implements Serializable {

public int id;
public BookPK () { }
public BookPK(int value){
id = value;
}
public boolean equals(Object obj){
if (obj == null || !(obj instanceof BookPK))
return false;
if (((BookPK)obj).id == id)
return true;

return false;
}
public int hashCode (){
return id;
}

public String toString(){
return String.valueOf(id);
}
}
********************************************************

If anybody can help..
Thanks,
Vishal