Pradeep Bhat

Ranch Hand
+ Follow
since Jan 12, 2008
Merit badge: grant badges
For More
Mumbai, India
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pradeep Bhat

Hi,

My code needs com.google.protobuf:protobuf-java version 3.5.1 to compile.
However for runtime i need com.google.protobuf:protobuf-java version 2.x as that version is compatible with the Hbase version that I am using.

Can you please explain, how to i handle this conflict i.e. compile with a higher version and run with a lower version.

Regards,
Pradeep.
3 years ago
Hi,

Some time i had changed my primary email id.
I am not receiving the code ranch journal since. I do get them at the old mail id.
Can you please let me know what i need to do to get the mails at my new id..

Regards,
Pradeep.
4 years ago
Hi,

How do I process a 7z file in java ?

Regards,
Pradeep..
12 years ago
Hi,

I have an application deployed on WebSphere 7.0 , Fixpack 13.
Spring based application with a front end on struts framework. Persistence - EJB2.0 and Hibernate.

Can you please let me know if there is a tool to monitor the system performance
1. I need to check the status of the database connection pool (as to how many sessions are created, active, destroyed etc.)
2. Number of threads that are executing, no of hung threads, etc.
3. Heap size

Regards,
Pradeep.
12 years ago
Can you please let me know what api can I use?
12 years ago
Hi,

This is my content manager setup.
IBM DB2CM 8.43 (WAS7 Base + DB2 (9.7) Backend)

This is my application server setup.
IBM WAS 7 Base + Oracle Backend.

To connect to content manager from my application I need to include cmbicmenv.ini file in my application classpath.

How do I do this? I keep getting the error .....

com.ibm.mm.sdk.common.DKDatastoreAccessError: DGL0394A: Error in :riverManager.getConnection; cmbicmenv.ini (EDC5129I No such file or directory.

1. I have tried keeping it in Environment\Shared libraries avail in WAS Console.
2. I do not have any db2jcc.jar in my classpath since my application database is oracle

Still keep getting the error.

Any suggessions.
Regards,
Pradeep.
12 years ago
Hi,


I have a parent child relationship.
Dept (One) ------ Student (Many)

Trying to persist a Dept along with its students.
Can see Dept entry in the database table.
Can see Student entries in the database table.

Problem : Student (child entity)entries have foreign key column as null in database.
What could be the problem for this?

Tried the following approaches.
1. Used <set>. Used java.util.Set in the Java class.
2. I have explicitly set parent reference to child objects.
3. Removed explicit foreign key constraint from database.

Table Details
----------------
Dept - ID(primary key) ........and other fields
Student - ID (primary key), DEPTID(foreign key), ........ and other fields.

HBM Mapping
----------------

<class entity-name="Dept" name="com.home.Dept" table="DEPT" lazy="false">
<id name="id" column="ID">
<generator class="increment"/>
</id>
<bag name="studentList" cascade="all" inverse="true" table="STUDENT" order-by="ID" lazy="false">
<key column="DEPTID" not-null="true"/>
<one-to-many entity-name="Student"/>
</bag>
</class>

<class entity-name="Student" name="com.home.Student" table="STUDENT" lazy="false">
<id name="id" column="ID">
<generator class="increment"/>
</id>
<many-to-one name="department" column="DEPTID" entity-name="Dept" lazy="false" insert="false" update="false" not-null="true"/>
</class>

Class Details
----------------

public class Dept implements IDept {
private long id;
private List studentList;

public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public List getStudentList() {
return studentList;
}
public void setStudentList(List studentList) {
this.studentList = studentList;
}
}

public class Student implements IStudent {
private long id;
private Dept department;

public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public Dept getDepartment() {
return department;
}
public void setDepartment(Dept department) {
this.department = department;
}
}

Code used for persistance
---------------------------------
IDept dept = new Department();
List studentList = new ArrayList();
Student a = new Student();
Student b = new Student();
a.setDepartment(dept);
b.setDepartment(dept);
studentList.add(a);
studentList.add(b);
dept.setStudentList(studentList);
getHibernateTemplate().save("Dept", dept); // Using Spring's Hibernate Template.




Thanks,
Pradeep.
Hi,

I need to maintain a pool of connection objects. These are not database connection objects but connections to external system like IBM enterprise content manager. I need to maintain maximum pool size, minimum size, preferably timeout period etc.

Is there a 3rd party API that can be used for this.

Regards,
Pradeep.
12 years ago
Hi,

I need to authenticate my user and password against a windows active directory. Also I need to use Kerberos encryption on my passwords. Can someone suggest a good tutorial for this.

Regards,
Pradeep.
12 years ago
Hi,

My branch structure is as follows:

Base Branch
--- Branch 1
--- Branch 2

I initially had my base branch.
I made 2 identical branches from it i.e. Branch 1 and Branch 2.

2 independent teams are making changes to Branch1 and Branch2,
Now I want to integrate the code changes made in Branch1 and Branch2 into a singe working copy. Identical file might have been modified in both branches.

Can this be achieved. I am currently using the following client.
TortoiseSVN-1.5.9.15518-win32-svn-1.5.6.msi

Regards,
Pradeep.



Why do I get the error : Duplicate XML entry for entities.CategoryDD???

My persistence.xml is as follows




And my orm.xml




Both are placed in META-INF folder.
But whenever i start my server i get the following error while deploying.

01:44:05,048 INFO [Configuration] Reading mappings from resource : /META-INF/orm.xml
01:44:05,118 INFO [Ejb3Configuration] [PersistenceUnit: DDTrial] META-INF/orm.xml found
01:44:05,158 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=#DDTrial state=Create
java.lang.IllegalStateException: Duplicate XML entry for entities.CategoryDD
at org.hibernate.cfg.annotations.reflection.XMLContext.addClass(XMLContext.java:91)
at org.hibernate.cfg.annotations.reflection.XMLContext.addDocument(XMLContext.java:76)
at org.hibernate.cfg.AnnotationConfiguration.add(AnnotationConfiguration.java:691)
at org.hibernate.cfg.AnnotationConfiguration.addInputStream(AnnotationConfiguration.java:779)
at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:929)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:758)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:425)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:301)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main$1.run(Main.java:547)
at java.lang.Thread.run(Thread.java:595)
01:44:05,388 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.j2ee:jar=41_OrderBilling_MDB_DD.jar,name=OrderBillingMDB_DDName,service=EJB3" is missing the following dependencies:
Dependency "<UNKNOWN jboss.j2ee:jar=41_OrderBilling_MDB_DD.jar,name=OrderBillingMDB_DDName,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=#DDTrial' **")

DEPLOYMENTS IN ERROR:
Deployment "persistence.unit:unitName=#DDTrial" is in error due to the following reason(s): java.lang.IllegalStateException: Duplicate XML entry for entities.CategoryDD
Deployment "<UNKNOWN jboss.j2ee:jar=41_OrderBilling_MDB_DD.jar,name=OrderBillingMDB_DDName,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=#DDTrial' **


The folloing entry is in my ejb-jar.xml


Still not working....but I did notice the following warning while deploying

21:41:07,328 WARN [MappedReferenceMetaDataResolverDeployer] Unresolved references exist in JBossMetaData:[#DepInjectImpl:AnnotatedEJBReferenceMetaData{name=dep.DepInjectImpl/placebid,ejb-ref-type=null,link=PlaceBidBean,ignore-dependecy=false,mapped/jndi-name=null,resolved-jndi-name=null,beanInterface=interface ejb3inaction.example.buslogic.PlaceBid}]
what is the difference between deploying a stateless session bean with a remote and local interface.

This is my code :




I do the look up as
HelloUser user = (HelloUser)ctx.lookup("hhh/remote");

This works fine. But the same doesn't work for local interface.





If i do the lookup as HelloUser user = (HelloUser)ctx.lookup("hhh/local");...i get the following exception

Exception in thread "main" javax.naming.NamingException: Could not dereference object [Root exception is java.lang.RuntimeException: Could not find InvokerLocator URL at JNDI address "hhh/local"; looking up local Proxy from Remote JVM?]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1472)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:818)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at HelloWorldClient.main(HelloWorldClient.java:11)
Caused by: java.lang.RuntimeException: Could not find InvokerLocator URL at JNDI address "hhh/local"; looking up local Proxy from Remote JVM?
at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.createProxyFactoryProxy(ProxyObjectFactory.java:185)
at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:146)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1447)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1464)
... 4 more




If i do the look up as HelloUser user = (HelloUser)ctx.lookup("hhh"); ...i get the exception as

Exception in thread "main" java.lang.ClassCastException: org.jnp.interfaces.NamingContext
at HelloWorldClient.main(HelloWorldClient.java:11)





I am using jdk1.5 and jboss-5.0.1.GA.