Showing posts with label Tweeting Troubleshooting. Show all posts
Showing posts with label Tweeting Troubleshooting. Show all posts

Sunday, May 27, 2012

The specified Tomcat installation directory does not exist

If you encountered this error on Eclipse:

The specified Tomcat installation directory does not exist.

Check for CATALINA_HOME value on commandline. Type set on commandline, you can then see the value of CATALINA_HOME, mine is /Library/Tomcat/Home

Go to Eclipse's Preferences. Go to Server > Runtime Environments. Then click Add, then select Apache Tomcat, click Next; on Tomcat installation directory, click Browse..., then paste /Library/Tomcat/Home to the Open dialog textbox; if you are using OS X press command+shift+G first, then paste /Library/Tomcat/Home in the Go to the folder's textbox, then click Go, then click Open

Then click Finish, then click OK

You can now create Dynamic Web Project

Thursday, March 8, 2012

NOTE: a missing vtable usually means the first non-inline virtual member function has no definition

When you encounter this compilation error:

Michael-Buens-MacBook:CppProj Michael$ gcc b.cpp
Undefined symbols for architecture x86_64:
  "operator new(unsigned long)", referenced from:
      _main in ccbv8mjf.o
      Alpha::doStuff(char) in ccbv8mjf.o
      Beta::doStuff(char) in ccbv8mjf.o
  "vtable for __cxxabiv1::__class_type_info", referenced from:
      typeinfo for Alphain ccbv8mjf.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "vtable for __cxxabiv1::__si_class_type_info", referenced from:
      typeinfo for Betain ccbv8mjf.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status


You are holding it wrong, use g++ :-)

Michael-Buens-MacBook:CppProj Michael$ g++ b.cpp


b.cpp (Liskov principle):
#include <cstdio>

class Alpha
{
 public: virtual Alpha* doStuff(char c)
 {
  printf("From Alpha\n");
  return new Alpha();
 }
};

class Beta : public Alpha
{
 public: virtual Beta* doStuff(char c)
 {
  printf("From Beta\n");
  return new Beta();
 }
};

int main()
{

 Alpha* a = new Beta();
 Alpha* x = a->doStuff('x');
 
 Beta* b = new Beta();
 Beta* y = b->doStuff('x'); // no need to cast to Beta
 
 
 return 0;
}

Thursday, June 2, 2011

Hibernate Troubleshooting

If you have the following errors, just drag the jar file to your lib folder

java.lang.NoClassDefFoundError: org/dom4j/DocumentException
copy this to your lib: dom4j-1.6.1.jar

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
copy this to your lib: slf4j-api-1.6.1.jar

java.lang.NoClassDefFoundError: javax/persistence/EntityListeners
copy this to your lib: hibernate-jpa-2.0-api-1.0.0.Final.jar

org.hibernate.HibernateException: JDBC Driver class not found: org.postgresql.Driver
copy this to your lib: postgresql-9.0-801.jdbc4.jar
download the latest Postgresql jdbc jar file from postgresql.org


java.lang.NoClassDefFoundError: org/apache/commons/collections/map/LRUMap
copy this to your lib: commons-collections-3.1.jar

org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
copy this to your lib: javassist-3.12.0.GA.jar

java.lang.NoClassDefFoundError: javax/transaction/Synchronization
copy this to your lib: jta-1.1.jar