Andy Bowes

Ranch Hand
+ Follow
since Jan 14, 2003
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 Andy Bowes

Hi Guys

Hope someone can help me.

We are using Spring & Hibernate on a WebLogic 9.1 & and and Oracle 9i database. Most of our queries work fine except one query which throws a Result Set closed when Hibernate attempts to fetch the child collection (Object C in schematic below).

All the operations are performed within a Transaction and so are within a single Hibernate Session.

It appears that WebLogic is automatically closing the Result Sets which Hibernate needs in order to fetch the child collection.

Has anyone seen this before as I am baffled?

Thanks
Andy




Approximate Mapping:
<Object A>
<many-to-one Object B>
<one-to-many Object C>
<many-to-one Object D/>
</one-to-many Object C>
</many-to-one Object B>
<one-to-many Object E/>
</Object A>

Partial Exception Stack Trace:
Caused by: java.sql.SQLException: Thread Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads] finds resultset already closed at Wed Apr 16 15:04:56 BST 2008 java.lang.Exception: Originally closed by Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads] at Wed Apr 16 15:04:54 BST 2008
at weblogic.jdbc.wrapper.ResultSet.internalClose(ResultSet.java:133)
at weblogic.jdbc.wrapper.Statement.closeAllResultSets(Statement.java:204)
at weblogic.jdbc.wrapper.Statement.internalClose(Statement.java:309)
at weblogic.jdbc.wrapper.Statement.internalClose(Statement.java:281)
at weblogic.jdbc.wrapper.Connection.closeAllStatements(Connection.java:364)
at weblogic.jdbc.wrapper.JTAConnection.closeAllStatements(JTAConnection.java:154)
at weblogic.jdbc.wrapper.JTAConnection.releaseXAConnIfNeeded(JTAConnection.java:228)
at weblogic.jdbc.wrapper.JTAConnection.getXAConn(JTAConnection.java:197)
at weblogic.jdbc.wrapper.JTAConnection.checkConnection(JTAConnection.java:68)
at weblogic.jdbc.wrapper.Statement.checkStatement(Statement.java:256)
at weblogic.jdbc.wrapper.Statement.doClose(Statement.java:348)
at weblogic.jdbc.wrapper.Statement.close(Statement.java:335)
at weblogic.jdbc.rmi.internal.StatementImpl.close(StatementImpl.java:125)
at weblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_oracle_jdbc_driver_T4CPreparedStatement_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:550)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:440)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:436)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:58)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:975)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
15 years ago
A Regular Expression can include spaces in the Pattern e.g.


[ May 02, 2007: Message edited by: Andy Bowes ]
16 years ago
I am trying to find the best way to associated a WebLogic cluster with an Oracle Advanced Queue. I basically want the Oracle AQ to appear as a JMS Resource for the applications which I deploy onto WebLogic.

I can't find any documentation at BEA which describes how to do this, has anyone out there done this already if so I need enlightenment .

Thanks
16 years ago
Hi Omer

Thanks for the reply.
I have worked it out using Regex and it works like a dream

Andy
16 years ago
Hi

I am trying to find a generic method to extract information from strings like:

"id:36 sub:001 dlvrd:001 submit date:0704270919 done date:0704270919 stat ELIVRD err:000"

I would like to be able to extract the values of particular items by defining a Regex style pattern. I am a bit of a regex newbie and I am not sure how to go about this. I had thought about using StringTokenizer but some of the value names have spaces in them and unfortunately I have no control over the format of these strings.

Can you use regex expressions to 'name' specific variable sections of the patterns so that they can be extracted by a Matcher?

Any help will be very welcome, thanks
16 years ago
Hi,

As stated above Tomcat does not support EJBs (some might actually say that this is a major benefit ) and it is unlikely to be extended to support them.

There is another project in the Apache portfolio that is being developed to be an open source EJB platform. For more info see Apache Geronimo Home Page. This is still in a relatively early incarnation but it could become a bit of competition for jBoss.
19 years ago
Hi Tony
Best way is to put the properties file into a directory in the deployed WAR file. I prefer to put it below the WEB-INF directory as then it cannot be viewed by typing the URL into a browser.
You can then use getResourceAsStream("/WEB-INF/myproperties.properties") to return you an InputStream that you can pass to the property.load() method.
HTH
20 years ago
Thanks Lasse.
I also found another another alternative were I selected all clients in alphabetical order and then select the list of orders for each specific client.
I now need to see which one of these performs best.
Hi
I have got a section of XML that looks like:

I want to get a list of orders but sorted by client name and then order id.
i.e. something like :

I have tried all sorts of XPath statements but I have not found the solution, can anyone out there enlighten me.
Thanks
Hi
Looking at the symptoms of your problem I would hazard a guess that something during your order submission process is either clearing the items from your shopping cart or placing a new Cart() object onto your session.
I suggest that you do a bit of debugging or use log4j to see exactly when the items are removed from your Cart.
20 years ago
Hi
It's a bit difficult to tell what the problem is without a look at your build.xml file. I've never heard of this recursive behaviour before.
Post up details of your compile task so that we can all give it a look over
20 years ago
Have a look at MVN Forum. It is open source and developed using Servlets, JSPs etc in a similar manner to Jive. I have not used it in a large project yet but it looks pretty good.
Shame that Jive is now longer free. I believe that if you purchase the commercial licence you do actually get the source code.
You have 2 options :
1. use "jar xvf myfolder.war" to extract the files
2. Use WinZip to open the war file and then extract the files that you need.
20 years ago
Instances of Servlets are automatically created by your Web Application Server e.g. Tomcat and this is done using a 'ServletFactory' that automatically invokes the constructor on the servlet. Once an instance of the servlet is created the application server will invoke the init() method.
The init() method does not create an instance it is merely a standard method that you can guarantee will be invoked AFTER an instance of the servlet has been instantiated.
HTH
20 years ago
The basic difference between these 2 methods is the scope or lifetime of the attribute you are setting.
If you set an attribute on the request it is only available for that specific request. If you set it on the session it is available for that request and all subsequent requests by the user using the session (i.e. until the session expires or you explicitly remove the attribute)
20 years ago