Bjorn Stove

Greenhorn
+ Follow
since Jan 08, 2005
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 Bjorn Stove

Thanks for the reply.
I will do that.

Regards
Bjorn
13 years ago
Hi!
Im trying to install JBoss on my Sheeva plug running ubuntu with openjdk6.
Sheeva plug runs on a arm processor 1,2 GHz, 512 mb ram, 8 gb sda.
When i install Tomcat6 it works like a charm. When I try to run JBoss the boot just stops
and I get following message from console.



Anyone can shred some light on this?
Is it not possible to run JBoss on this setup?

Thanks
Best Regards
Bjorn
13 years ago
Hi friends.

Im uploading a file, using on client side HttpClient from org.apache.commons package.

Im streaming the file to the server.

How can I let a user cancel the upload nicely?

Im using HttpClient code like this, implemented with a listener.





My class with listener and write methods...




How is the best way to cancel the stream to the server.
I havent find anything in HttpClient to achieve this.
Maybe there is a way to subclass and override, but I have not managed to
figure that out.


Any help appreciated

Best Regards
Bjorn
Thanks for advice, very helpful.

I will look into both.

I mean if one writes one appender that manage this,
maybe that also could be of intrest for others.

I dont think requirement for logging per user is that uncommon.

Thank you very much.

Best Regards

Bjorn
15 years ago
Hi all!

Is it possible to use log4j in JBoss (or elsewhere)
to get a new logfile for every user.

For example mike_080807.log dave_080807.log

Is it only possible to split up different file appender
per category ?


Best Regards
Bjorn
15 years ago
Hi ranchers!
Im having a datasource problem when using Spring with Struts.
When I use my web application it works fine the first time
I log in and the db connection works fine.

When I open a second browser and log in the datasource connection
times out.

Using Struts 1.3 JBoss 4.0.4 Spring 2.5

I use spring plug-in in my strut-config.xml:




I have a 'StartAction' that init the database:
code snippet:


So this works fine first time. But second time request from another browser
generats error like stated below.

Maybe I missunderstand something about Spring how it handles hibernate Sessions?



Thanfull for any help.

Error log:

11:06:44,112 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
11:06:44,112 ERROR [JDBCExceptionReporter] No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ))
11:06:44,112 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
11:06:44,112 ERROR [JDBCExceptionReporter] No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ))
11:06:44,174 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
11:06:44,206 INFO [SQLErrorCodesFactory] SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
11:07:14,237 WARN [SQLErrorCodesFactory] Error while extracting database product name - falling back to empty error codes
org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.jboss.util.NestedSQLException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ))
at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:198)
at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:225)
at org.springframework.jdbc.support.SQLErrorCodesFactory.getErrorCodes(SQLErrorCodesFactory.java:216)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.setDataSource(SQLErrorCodeSQLExceptionTranslator.java:147)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.<init>(SQLErrorCodeSQLExceptionTranslator.java:110)
at org.springframework.orm.hibernate3.SessionFactoryUtils.newJdbcExceptionTranslator(SessionFactoryUtils.java:143)
at org.springframework.orm.hibernate3.HibernateAccessor.getDefaultJdbcExceptionTranslator(HibernateAccessor.java:453)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:378)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:338)
at com.bmsystem.hibernate.ObjectsUsersDao.findObjectsByUserName(ObjectsUsersDao.java:43)
at com.bmsystem.palaceweb.delegate.ObjectUsersORMDelegate.findObjectsByUserName(ObjectUsersORMDelegate.java:39)
at com.bmsystem.palaceweb.logic.impl.PalaceWebDatabaseHandlerImpl.findObjectsByUserName(PalaceWebDatabaseHandlerImpl.java:70)
at com.bmsystem.palaceweb.logic.impl.RatSelectionContainerImpl.refreshRatList(RatSelectionContainerImpl.java:83)
at com.bmsystem.palaceweb.actions.StartAction.execute(StartAction.java:66)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.bmsystem.palaceweb.util.RequestFilter.doFilter(RequestFilter.java:65)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.jboss.util.NestedSQLException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ))
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)
at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:185)




Best Regards
Bjorn
Hi friends!

I try to move up an EJB application from JBoss 3.2.3 to 4.2.2.

I have modified all deployment descriptors and so on.

My ejb.jar file deploys nicely and so does my war file.

When I then try to use the Application I get following message from
JBoss-4.2.2



Can anybody please help me to point out where
the problem could be!


Thanks in advance.

Best Regards.
Bjorn
15 years ago
Hi! Just dont get it!
Cant get it to work! What am I missing.
Please help me out.

My applicationContext.xml



And my BWReference.hbm.xlm



Then some code just to test..


I also get the entity "BWReference" when I check:
final String entityName = classMetadata.getEntityName();

And output gives me following...



Thankfull for any hint.
/Bjorn
I have some problem with getting data from EJB that is loaded from
a View in a RDBMS. When the EJB is loaded second time it holds
stale data. Even if the View has been updated from another table,
invocing business method on bean returns stale data.
Is this a problem related to ejb and caching?
Have also tried commit option C.

Can someone please point me in right direction for this problem?

Best Regards
Bjorn
Hi!
Do you have anything on performance gain, using EJB3 instead
of EJB2.x in your book?

Regards
/Bjorn
Hi. Im new to Struts.
Am I violating any design principle if I dont
name my forward to 'success' everytime.
I was thinking naming it to the next jsp being displayed,
for example: actionMapping.findForward("Order");
Then I can go direct to the Order.jsp page without
peeking in the struts-config file.
Is that bad practise??
Thanks for advice.
Best Regards
Bjorn
17 years ago
Hi developers.
I need some help how to populate my dto.
I have more than one EJB that have the same property, because
of I sometimes have to get value from a view and sometimes
from a table.
For example property, Integer articleType.
I want to convert this integer into something meaningful
in the view.(String object saying something meaningful) Do I have to put a method converting this in every SessionFacade or dto for the corresponding EJB? Or is the best practise to make articleType its own datatype in
a class and let that class handle all the convertion, and
put that datatype into the dto?
Little bit confused about the best approach.
Best Regards
Bjorn
Hi.
I have a best practise question.
I want to populate my actionForm with only String properties.
I have a dto that contains both Strings and Integers and so on.
If I only have one dto theres no problem. I can just use
beanutilities or just convert to the corresponding actionForm.
But if I recieve a collection of dto:s into my actionForm what is the
best practice to convert them to String properties, so that I can just use logic:iterate in my html page.

Best Regards
Bjorn
17 years ago
Hi!
I have an application that runs fine in JBoss-3.2.3.
The application is deployed in war file and an ejb-jar.jar file
When I deploy and run it in JBoss-4.0.4.GA I get an Error:
org.apache.jasper.JasperException: /user/ListSMSOrders.jsp(13,0) The value for the useBean class attribute argus.web.bean.ListSMSOrders is invalid.

My jsp files doesnt work as expected.
I have tried to read the wiki files on the subjekt but there must be
something I dont get.
Any input on the subject is welcome.
I know the class loading is quite different in JBoss 4.
But is there a small change in a xml file that will do the trick?
Thanks!
Bjorn
17 years ago
Hi!
Newbie question?
I have installed JBoss-4.0.4.GA on SUSE 10.0 with JRockit as JVM and the
installation worked fine. But when Im starting JBoss it
starts fine but it can not open any ports?? 8080,1099 and so on
They are already bined..and no other app. running.
I have disabled the firewall.
Any help appreciated.
Greetings
Bjorn
17 years ago