[jboss-user] [EJB 3.0] - Re: image to blob

argonist do-not-reply at jboss.com
Tue Aug 7 08:05:05 EDT 2007


Wow. That is really simple way. How do you know? I don't find it in internet.
So I have changed from Blob to byte[], but I got error message.

Entity InterpreterImage

  | @Entity
  | @Table(name="INTERPRETERIMAGE")
  | public class InterpreterImage implements Serializable
  | {
  | 	....
  |         .....
  | 	@Lob
  | 	@Column(name="GALLERYIMAGE")
  | 	private byte[] galleryImage;
  |         .....
  | 
  | 	public String getGalleryFilename() {
  | 		return galleryFilename;
  | 	}
  | 
  | 	public void setGalleryFilename(String galleryFilename) {
  | 		this.galleryFilename = galleryFilename;
  | 	}
  | 
  | 	public byte[] getGalleryImage() {
  | 		return galleryImage;
  | 	}
  | 
  | 	public void setGalleryImage(byte[] galleryImage) {
  | 		this.galleryImage = galleryImage;
  | 	}
  | 


  | 	public String submitMyProfil() {
  | 			interpreter.getInterpreterImage().setGalleryImage(galleryFile.getBytes());
  | 			interpreter.getInterpreterImage().setGalleryFilename(filename);
  | }
  | 

Error message:

  | 13:22:10,675 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
  | javax.faces.FacesException: Error calling action method of component with id _idJsp0:_idJsp24
  | 	at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
  | 	at javax.faces.component.UICommand.broadcast(UICommand.java:109)
  | 	at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
  | 	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
  | 	at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
  | 	at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
  | 	at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
  | 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
  | 	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.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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
  | 	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: javax.faces.el.EvaluationException: Exception while invoking expression #{interpreterDataImageHandler.submitMyProfil}
  | 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
  | 	at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
  | 	... 29 more
  | Caused by: java.lang.NoSuchMethodError: de.kirchedlau.ponte.ejb.entities.InterpreterImage.setGalleryImage([B)V
  | 	at de.kirchedlau.ponte.InterpreterDataImageHandler.submitMyProfil(InterpreterDataImageHandler.java:44)
  | 	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.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
  | 	... 30 more
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071564#4071564

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071564



More information about the jboss-user mailing list