Joe Richard

Ranch Hand
+ Follow
since Aug 15, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Joe Richard

I have a WSDL that defines a <wsoap12:address> that is different than the environment the WSDL is being served at.

Does the address have to match the were the service will actually be located?

5 years ago

Another thing I would check is the ejb-jar.xml: you don't have the same EJB declared in the ejb-jar.xml and by annotations, do you?



I do not,  my ejb-jar file is empty.

Here are the EJB annotations I am using:

RunSilverpopReportBean


SilverpopTimer


My method is annotated using the @Schedule annotation:


Still submits a duplicate job.
I have tried a @Stateless @Session bean and I get the same duplicate thread being created.



Still getting duplicate threads from Websphere Liberty.

Are you sure that the two threads are running? It might just be the Logger logging twice.



It is not the logger, the application sends emails of its progress; I am getting duplicate emails from the application also.
I am not sure what the container does when it creates the timer and the timer times out.

I will give the @Stateless @Session bean a try.

Is this method on a Stateless Session Bean?


The method is on a @Singleton Bean.

It is suppose to create and execute one thread but two threads are getting created.


I get the error on my local machine doing unit testing also.
I have a method that uses the @Schedule annotation.  It is suppose to create and execute one thread but two threads are getting created.



The messages that are created in the console.log are;
606225 [LargeThreadPool-thread-107] INFO com.uline.silverpopxmlapi.ftpdata.FTPFileCheck  - [USER:Unknown][TIER:DevClients] *** FTP job scheduled for 12/20/2016 17:52:08
606303 [LargeThreadPool-thread-121] INFO com.uline.silverpopxmlapi.ftpdata.FTPFileCheck  - [USER:Unknown][TIER:DevClients] *** FTP job scheduled for 12/20/2016 17:52:08

How do I keep the second thread from being created?

I am running on Liberty server.
Hi all,

I am trying to use a named query with an IN clause, but it does not work;

My IDE forces to add the parenthesis around the :mailingIDList, all of the documentation I find about using the IN clause says I do not need the parenthesis.
I am using eclipseLink 2.5.0.

Here is what the method containing the entityManager executing the JPA looks like:


Not sure what the problem is, if I remove the parentheisis I get a syntax error on the query in my IDE.
I get a failure with the parenthesis around the :mailingIDList of;
You have attempted to set a value of type class java.util.HashSet for parameter mailingIDList with expected type of class java.lang.Integer from query string SELECT m FROM MarketingMailingIDMRMXRef m WHERE m.mailingID IN (:mailingIDList).

I think my problem is with EclipseLink not allowing me to not use a parenthesis, but how do I get around that?
I am trying to get a directory listing of a location on my server using tomcat.
How do I use the mod_autoindex.c in tomcat to do that?

Is there a special way to configure a web.xml for that?

Joe Richard
7 years ago
Does JspWriter automatically convert string text to lowercase?

I have a tag that I am creating that will output the name of tags in my tag library.
The tag names in my tag library have mixed upper and lower case.
I have the names of the tags I need set in an array in my tag class, when I step through the program in debug the names are correct with mixed case.
After the page finishes loading my output is correct except the tag names have been converted to lowercase.

Is there a way to change this or can I supply an alternate(alias) tag name in my tag library?

Thank you for any help you can provide.

12 years ago
JSP
I am trying to get my web application to startup in tomcat 6, but I keep getting error:

Nov 4, 2011 9:52:37 AM org.apache.catalina.core.ApplicationContext log
INFO: Loading Spring root WebApplicationContext
Nov 4, 2011 9:52:37 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'propertyPlaceholderConfigurer' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Can't resolve reference to bean 'configurationProperties' while setting property 'properties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationProperties' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.apache.naming.NamingContext] to required type [org.springframework.core.io.Resource] for property 'location']
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationProperties' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.apache.naming.NamingContext] to required type [org.springframework.core.io.Resource] for property 'location']
PropertyAccessExceptionsException (1 errors)
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.apache.naming.NamingContext] to required type [org.springframework.core.io.Resource] for property 'location'
at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:1035)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:803)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:716)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:844)
at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:871)
at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:860)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:926)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:727)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:336)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:916)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:727)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:336)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:536)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:358)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:294)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Nov 4, 2011 9:52:37 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Nov 4, 2011 9:52:38 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Nov 4, 2011 9:52:38 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()


Here is the bean code from my applicationContext.xml:
<!-- Import deployment configuration file path from JNDI -->
<bean id="configurationPath" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>java:comp/env/jdbc</value>
</property>
</bean>

<bean id="configurationProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="location">
<ref bean="configurationPath" />
</property>
</bean>

<bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="properties">
<ref bean="configurationProperties" />
</property>
</bean>

Here is the code from my Web.xml:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>

<!-- Loads Context (Session Beans) via applicationContext.xml -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<!-- Resource Reference -->
<resource-ref>
<res-ref-name>jdbc/jdbc</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
12 years ago
Hi,

I am having a problem retreiving the values from my form submit.
I never have any of the input parameters come back.

Here is my code:



Here are the bean methods:



Any help would be greatly appreciated.
12 years ago
JSF
Hi all,

I am trying to use a javaBean to pull data and populate a someList<someObject>.
I want to use JSTL this is what I have that doesn't work.

<f:selectItems id="#{javaBean.someList.someObject.field1}" itemLabel="#{javaBean.someList.someObject.field2}" itemValue="#{javaBean.someList.someObject.field1}"/>

Any ideas how to do this with jsf?

12 years ago
JSF
Thanks Paul!

That fixed my problem.

String mailhost = ssn.getProperty("mail.host");
trans.connect(mailhost, "mailserver", "mail");

Hello all,

I am having problems connecting using java mail api.
Where do I put the password?

javax.mail.AuthenticationFailedException: failed to connect, no password specified?
at javax.mail.Service.connect(Service.java:325)
at javax.mail.Service.connect(Service.java:172)
at javax.mail.Service.connect(Service.java:121)
at com.glenoit.util.email.EmlXlSndBA.sendDta(EmlXlSndBA.java:280)
at com.excellfash.projectionsheets.ProjectionEmailer.email(ProjectionEmailer.java:121)
at com.excellfash.projectionsheets.EmailProjectionSheet.emailProjection(EmailProjectionSheet.java:41)
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:597)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1056)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:139)
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:597)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:190)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:84)
at $Proxy121.emailProjection(Unknown Source)
at com.excellfash.projectionsheets.ProjectionSheetReportServlet.doPostEmail(ProjectionSheetReportServlet.java:170)
at com.excellfash.projectionsheets.ProjectionSheetReportServlet.doGet(ProjectionSheetReportServlet.java:83)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)



Here is the code: