Tag: Java

tomcat remote deploy with curl

Deploy a new local war file curl –anyauth –form deployWar=@war_file_path –user username:password http://tomcat_server_addr:8080/manager/html/upload Undeploy curl http://tomcat_server_addr:8080/manager/undeploy?path=/Context_Path –anyauth –user username:password Reload curl http://tomcat_server_addr:8080/manager/reload?path=/Context_Path –anyauth –user username:password Tags: anyauth, curl, deploy, deployWar, form, Java, password, Reload, Tomcat, Undeploy, username

Read More

hibernate jointable kullanımı

import java.io.Serializable; import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; /**  *  * @author Muhammed YÜRÜRDURMAZ  */ @Entity @Table(name = "KISI_TBL") public class Kisi implements Serializable {     @Id     @GeneratedValue(strategy = GenerationType.AUTO)     @Column(name = "KISI_ID")     private int KisiId;     @Column(name="ISIM", length=64, nullable=false)     private String isim;     @ManyToMany     @JoinTable(name = "KISI_TELEFON_TBL", joinColumns = {         @JoinColumn(name = "KISI_ID")},     inverseJoinColumns = {         @JoinColumn(name = "TELEFON_ID")})     private List<Telefon> telefonlar;…

Read More

hibernate blob kullanarak resim kaydetme

import java.io.Serializable; import java.sql.Blob; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.Lob; import javax.persistence.ManyToOne; @Entity(name="resim") public class Resim implements Serializable {     @Column(name="id")     @Id     private int id;     @Column(name="resim")     @Lob     private Blob resim;     /**      * @return the id      */     public int getId() {         return id;     }     /**      * @param id the id to set      */     public void setId(int id) {         this.id = id;     }     /**      * @return the resim      */     public Blob getResim() {         return resim;…

Read More

netbeans web servisleri 64bit

64bit windows 7 üzerine 32bit jdk kurup web servislerini çalıştırmaya çalıştığınızda çalışmıyor. 64bit jdk deneyin Tags: 64bit, Java, netbeans, soap, Windows 7

Read More

jboss heap size ayarı

jboss heap size ayarı bin/run.conf dosyasındaki JAVA_OPTS= ile başlayan satırdan yapılabilir. Örnek min. 256m max. 1024m JAVA_OPTS=”-Xms256m -Xmx1024m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000″ değişikliklerden sonra jboss u kapatıp açmayı unutmayın windows üzerinde bin/run.conf.bat içerisinden yapılıyor Tags: heap size, Java, JAVA_OPTS, jboss

Read More

Caused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log

Caused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log şeklinde bir hata alıyorsanız muhtemel sebebi proje dizininizde veya classpath içerisinde birden fazla commons-logging jar mevcuttur. Kullanmadığınızı silin veya başka bir yere taşıyın. Tags: commons-logging, Java, log4j

Read More

oracle application server Operation failed with error: org/apache/log4j/Category

Oracle Application Server üzerinde deploy yaparken Operation failed with error: org/apache/log4j/Category şeklinde bir hata alıyorsanız deploy sırasında apache.commons.logging kütüphanesini deploy sırasında classpath ayarlarından kaldırın Tags: classpath, deploy, Hata, J2EE, Java, log4j, Oracle Application Server

Read More

java tarih formatlama (SimpleDateFormat)

import java.text.SimpleDateFormat; import java.util.Date; public class JavaSimpleDateFormatOrnek{ public static void main(String args[]){ Date date = new Date(); SimpleDateFormat sdf = new SimpleDateFormat(“dd/MM/yyyy”); System.out.println(“Bu gün ” + sdf.format(date) ); } } Tags: Örnek, date, Java, SimpleDateFormat, tarih

Read More

java ile webservis metodlarının parametre isimlerini belirlemek

int getToplam(@WebParam(name=”deger1″)int deger1, @WebParam(name=”deger2″)int deger2); Tags: Java, WebParam, WebService

Read More

java.lang.NoSuchMethodError org.objectweb.asm.ClassWriter hatası

Exception in thread “main” org.osoa.sca.ServiceRuntimeException: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:204) at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANodeFromClassLoader(NodeFactoryImpl.java:37) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:178) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:100) at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:182) at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63) at com.aa.tools.resource.test.TSMain.main(TSMain.java:17) Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V at org.apache.tuscany.sca.interfacedef.java.jaxws.BaseBeanGenerator.generate(BaseBeanGenerator.java:436) at org.apache.tuscany.sca.interfacedef.java.jaxws.FaultBeanGenerator.generate(FaultBeanGenerator.java:94) at org.apache.tuscany.sca.interfacedef.java.jaxws.GeneratedDataTypeImpl.getPhysical(GeneratedDataTypeImpl.java:106) at org.apache.tuscany.sca.binding.ws.wsdlgen.Interface2WSDLGenerator.generateOperation(Interface2WSDLGenerator.java:705) at org.apache.tuscany.sca.binding.ws.wsdlgen.Interface2WSDLGenerator.generate(Interface2WSDLGenerator.java:318) at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.createWSDLInterfaceContract(BindingWSDLGenerator.java:307) at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.createWSDLDocument(BindingWSDLGenerator.java:205) at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.generateWSDL(BindingWSDLGenerator.java:163) at org.apache.tuscany.sca.binding.ws.xml.BindingBuilderImpl.build(BindingBuilderImpl.java:48) at org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuilderImpl.buildServiceBindings(ComponentServiceBindingBuilderImpl.java:68) at org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuilderImpl.build(ComponentServiceBindingBuilderImpl.java:48) at org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl.build(CompositeBuilderImpl.java:259) at org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.buildComposite(RuntimeBootStrapper.java:255) at org.apache.tuscany.sca.node.impl.NodeImpl.configureNode(NodeImpl.java:632) at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:200)…

Read More