Sagar Kar

Greenhorn
+ Follow
since Sep 03, 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 Sagar Kar

I was learning some was administration. So I downloaded the WAS 6.1 installables for windows and was trying to install on a XP development box.
However when I have the security settings on I am unable to stop the server or check the server status. I tried wsadmin and it also fails when using SOAP. Basically I am unable to connect to the server using SOAP protocol even though I am using the correct port and host.
I am able to connect wsadmin using RMI. The error I am getting is related to certificates. But I don't know how to fix it. I get some kind of SOAP Client error and it seems to be some kind of SSLHandshakeException.

com.ibm.websphere.management.exception.ConnectorException: ADMC0053E: The system cannot create a SOAP connector to connect to host <host name> at port 8884 with SOAP connector security enabled.
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:486)
at com.ibm.ws.scripting.CommonScriptingObject.connectToAdminService(CommonScriptingObject.java:120)
at com.ibm.ws.scripting.CommonScriptingObject.<init>(CommonScriptingObject.java:101)
at com.ibm.ws.scripting.AdminControlClient.<init>(AdminControlClient.java:165)
at com.ibm.ws.scripting.AbstractShell.createControlClient(AbstractShell.java:1062)
at com.ibm.ws.scripting.AbstractShell.run(AbstractShell.java:1932)
at com.ibm.ws.scripting.WasxShell.main(WasxShell.java:1022)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:183)
at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:90)
at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:72)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:336)
at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:91)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:522)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:341)
... 27 more
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: PKIX path building failed: java.security.cert.CertPathBuilderException: unable to find valid certification path to requested target; targetException=java.lang.IllegalArgumentException: Error opening socket: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: PKIX path building failed: java.security.cert.CertPathBuilderException: unable to find valid certification path to requested target]
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:344)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.<init>(SOAPConnectorClient.java:177)
... 32 more
Caused by: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: PKIX path building failed: java.security.cert.CertPathBuilderException: unable to find valid certification path to requested target; targetException=java.lang.IllegalArgumentException: Error opening socket: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: PKIX path building failed: java.security.cert.CertPathBuilderException: unable to find valid certification path to requested target]
at org.apache.soap.transport.http.SOAPHTTPConnection.send(Unknown Source)
at org.apache.soap.rpc.Call.invoke(Unknown Source)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient$4.run(SOAPConnectorClient.java:309)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:302)
... 33 more
15 years ago
We have built a set of web services. However few of our clients are not able to understand web services. Hence we need to build some wrapper over our web services so that they can send in http request and receive xml responses.
I have heard that REST can do something similar.
Are their any framework which can help me build some REST services to wrap around my web services?
15 years ago
My SQL is

with networkids as
(
select s.default_network_id id from store s where s.id=?
union
select nfs.network_id as id from
store s
inner join network_fixed_sched nfs on s.id=nfs.store_id
where s.id=:store1id
union
select nws.network_id as id from
store s
inner join network_weekly_sched nws on s.id=nws.store_id
where s.id=:store1id
)
select count(*) from network_detail nd, networkids ids
where nd.network_id=ids.id
and nd.store_id=store2id

I am unable to convert this to a HQL. But before this SQL is fired I am deleting a row using HQL. I don't want that row to be picked up in this SQL.
Also direct SQL means native SQL.
like
select id,name from EMPLOYEE
Thank you Mark for you prompt reply.
I am using transaction properties

<prop key="hibernate.transaction.factory_class">
org.hibernate.transaction.CMTTransactionFactory
</prop>
<propkey="hibernate.transaction.manager_lookup_class">
org.hibernate.transaction.WebSphereExtendedJTATransactionLookup
</prop>

Also I am using Spring's AOP to demarcate transactions.
From your post what i understand is that mixing hql and sql won't create any problem.
I have a question regarding mixing SQL and HQL in the same transaction.
Consider a table EMPLOYEE.
It has 3 records. I start a transaction. I fire a HQL and delete an Employee record. I fire a direct SQL select on the EMPLOYEE table in the same transaction.
How many records will I get? 2 or 3?
I am not using a second level cache.
Is it okay to mix SQL and HQL in the same transaction?
I am not using any second level cache.
I found one possible solution.
We use IBM's Websphere Application Server 6.0 XD. It has something called a Compute Grid. This can be used to run the jobs and expose these jobs as EJB's or web services.
15 years ago
I have around 10 java batch jobs that I run from command line.
All these jobs are a bunch of java classes.

Background:

Our company gets monthly information from different places in form on Microsoft Access Database files.

We have a central oracle database which maintain the relationship between all these data and needs to be updated with the latest data contained in these mdb files.

Now the boss wants a GUI to be able to start and stop and look at the status of the job while it is running.

The jobs take different parameters so the UI should have a way to accept different inputs just like an html form.
We have a shared drive where we drop the mdb files before we run the command jobs.

Any ideas about how to go about it?

Idea 1:

I was thinking of writing a web application.
But few jobs might take as much as 2 hrs to run.
So it may not be a good idea to run them from an appserver.
Holding up appserver threads doesn't seem to be a good idea.

Idea 2:
I have access to all the source files.
Convert the batch jobs to Remote Objects and run them on as remote service thru rmi registry.

But what about the UI? Can I have a web application, running on a appserver like tomcat, which can invoke the rmi objects and then check there status?

Any new ideas? What would be the best way of solving this problem.

Thank you.
15 years ago
I found the following information from the sun site http://java.sun.com/j2se/1.3/docs/tooldocs/win32/keytool.html#genkeyCmd

Since I am a java guy I am also posting this query in the java forum.

When we use the -genkey argument the keytool "generates a key pair (a public key and associated private key). Wraps the public key into an X.509 v1 self-signed certificate, which is stored as a single-element certificate chain".

When we use the -selfcert argument the keytool "generates an X.509 v1 self-signed certificate, using keystore information including the private key and public key associated with alias".

If -genkey generates a self signed certificate what does -selfcert do?
I can't understand what actually happens between -genkey and -selfcert.
What does self sign mean in both the case?
17 years ago
I found the following information from the sun site http://java.sun.com/j2se/1.3/docs/tooldocs/win32/keytool.html#genkeyCmd


When we use the -genkey argument the keytool "generates a key pair (a public key and associated private key). Wraps the public key into an X.509 v1 self-signed certificate, which is stored as a single-element certificate chain".

When we use the -selfcert argument the keytool "generates an X.509 v1 self-signed certificate, using keystore information including the private key and public key associated with alias".

If -genkey generates a self signed certificate what does -selfcert do?
I can't understand what actually happens between -genkey and -selfcert.
What does self sign mean in both the case?
17 years ago
Contrats !!!
Now can you please reply to the following ....
I had posted the query a few day back and no one is replying....
I don't know whether its a silly question or a difficult one..


Think of the Movie and Trailer example.
Think of it as an one to one bidirectional relationship.
There is a movie M1 and a trailer T1.
M1.getTrailer() will give T1 and T1.getMovie() will give M1.
Now suppose I do something like the following....
M1.setTrailer(null);
After the execution of this statment will T1.getMovie() return null or is it still going to return M1?
[ January 26, 2006: Message edited by: Sagar Kar ]
Think of the Movie and Trailer example.
Think of it as an one to one bidirectional relationship.
There is a movie M1 and a trailer T1.
M1.getTrailer() will give T1 and T1.getMovie() will give M1.
Now suppose I do something like the following....
M1.setTrailer(null);
After the execution of this statment will T1.getMovie() return null or is it still going to return M1?


Thanks and regards,
Sagar Kar
Why does EntityBean interface has an unsetEntityContext() method where as SessionBean interface doesn't have an unsetSessionContext() method. What is so special about the unsetEntityContext() method?
Depends on what kind of exception was thrown:
For an Application Exception(checked exception), the instance is not destroyed
For an Non Application Exception(Runtime Exceptions), the instance is not used anymore and the resources are cleaned up by the container.

For more depth answer please refer to the EJB specs.
Hi,

I am using WSAD 5.1.1 integration edition.
"Generate Deployment Code" on any EJB fails with the following exception.
Has anyone encountered such errors? Can anyone give any hint what might be causing the error. It seems that the RMIC compiler is not able to find the EJB classes. Any suggestion is welcome.

java.lang.NoClassDefFoundError: com/gnw/hub/adapter/cloas/CLOASHoldingSearchBean
at java.lang.ClassLoader.resolveClass0(Native Method)
at java.lang.ClassLoader.resolveClass(ClassLoader.java:920)
at com.ibm.tools.rmic.iiop.DirectoryLoader.loadClass(DirectoryLoader.java:105)
at com.ibm.tools.rmic.iiop.CompoundType.loadClass(CompoundType.java:350)
error: An error has occurred in the compiler; please file a bug report (http://java.sun.com/cgi-bin/bugreport.cgi).
at com.ibm.tools.rmic.iiop.Type.initClass(Type.java:997)
1 error
at com.ibm.tools.rmic.iiop.Type.setRepositoryID(Type.java:1014)
at com.ibm.tools.rmic.iiop.CompoundType.initialize(CompoundType.java:758)
at com.ibm.tools.rmic.iiop.ImplementationType.initialize(ImplementationType.java:195)
at com.ibm.tools.rmic.iiop.ImplementationType.forImplementation(ImplementationType.java:90)
at com.ibm.tools.rmic.iiop.StubGenerator.getTopType(StubGenerator.java:153)
at com.ibm.tools.rmic.iiop.Generator.generate(Generator.java:273)
at sun.rmi.rmic.Main.doCompile(Main.java:553)
at sun.rmi.rmic.Main.compile(Main.java:148)
at sun.rmi.rmic.Main.main(Main.java:792)
RMIC Command returns RC = 1. The problems which stopped RMIC are displayed, and have also been recorded in the .log file in D:\IBM\WebSphere Studio\RajeevWS\Hub\.metadata
18 years ago